mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Use NOT operator to complement bits instead of XOR
The previous way of doing it relied on the variable being 32-bit wide. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -128,7 +128,7 @@ calcrpn(struct sPatch * pPatch)
|
||||
rpnpush(rpnpop() ^ rpnpop());
|
||||
break;
|
||||
case RPN_UNNOT:
|
||||
rpnpush(rpnpop() ^ 0xFFFFFFFF);
|
||||
rpnpush(~rpnpop());
|
||||
break;
|
||||
case RPN_LOGAND:
|
||||
rpnpush(rpnpop() && rpnpop());
|
||||
|
||||
Reference in New Issue
Block a user