mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-12-04 08:49:19 +00:00
fix 16-bit branch out-by-one error
This commit is contained in:
parent
dec3106744
commit
5c4b23cbee
@ -768,7 +768,7 @@ class Assembler(Pass):
|
||||
def relativizelong(self, expr, env, arglen):
|
||||
"Convert an expression into one for use in relative addressing"
|
||||
arg = expr.value(env)
|
||||
arg = arg - (env.getPC() + arglen + 1)
|
||||
arg = arg - (env.getPC() + arglen)
|
||||
if arg < 0:
|
||||
arg += 65536
|
||||
return IR.ConstantExpr(arg)
|
||||
|
Loading…
Reference in New Issue
Block a user