mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 04:17:25 +00:00
Fixed the parsing of the operand sign (#10166)
This commit is contained in:
parent
2ca2a0ae15
commit
36a3fa526a
@ -4309,6 +4309,13 @@ static int parseOperand(RAsm *a, const char *str, Operand *op, bool isrepop) {
|
|||||||
op->offset_sign = -1;
|
op->offset_sign = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//with SIB notation, we need to consider the right sign
|
||||||
|
char * plus = strchr (str, '+');
|
||||||
|
char * minus = strchr (str, '-');
|
||||||
|
char * closeB = strchr (str, ']');
|
||||||
|
if (plus && minus && plus < closeB && minus < closeB) {
|
||||||
|
op->offset_sign = -1;
|
||||||
|
}
|
||||||
// If there's a scale, we don't want to parse out the
|
// If there's a scale, we don't want to parse out the
|
||||||
// scale with the offset (scale + offset) otherwise the scale
|
// scale with the offset (scale + offset) otherwise the scale
|
||||||
// will be the sum of the two. This splits the numbers
|
// will be the sum of the two. This splits the numbers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user