mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-15 01:10:01 +00:00
Fix signed char boundaries when assembling jump
Signed char can be between -0x80 and 0x7f. The offset in the jump must be computed taking into account the instruction length.
This commit is contained in:
parent
181a52ef38
commit
d5c40be889
@ -1201,7 +1201,7 @@ SETNP/SETPO - Set if No Parity / Set if Parity Odd (386+)
|
||||
}
|
||||
|
||||
dst -= offset;
|
||||
if (dst>-0x80 && dst<0x7f) {
|
||||
if (-0x80 <= (dst-2) && (dst-2) <= 0x7f) {
|
||||
/* relative byte address */
|
||||
data[l++] = 0xeb;
|
||||
data[l++] = (char)(dst-2);
|
||||
|
Loading…
Reference in New Issue
Block a user