mirror of
https://github.com/notwa/lips
synced 2024-11-14 17:59:02 -08:00
fix branching in some cases
This commit is contained in:
parent
a3bb50a1a6
commit
12ca82e40a
1 changed files with 3 additions and 1 deletions
4
lips.lua
4
lips.lua
|
@ -1474,7 +1474,9 @@ function Dumper:desym(tok)
|
|||
if label == nil then
|
||||
self:error('undefined label')
|
||||
end
|
||||
local rel = floor(label/4) - 1 - floor(self.pos/4)
|
||||
label = label % 0x80000000
|
||||
local pos = self.pos % 0x80000000
|
||||
local rel = floor(label/4) - 1 - floor(pos/4)
|
||||
if rel > 0x8000 or rel <= -0x8000 then
|
||||
self:error('branch too far')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue