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:
@@ -362,6 +362,6 @@ void
|
||||
rpn_UNNOT(struct Expression * expr, struct Expression * src)
|
||||
{
|
||||
*expr = *src;
|
||||
expr->nVal = expr->nVal ^ 0xFFFFFFFF;
|
||||
expr->nVal = ~expr->nVal;
|
||||
pushbyte(expr, RPN_UNNOT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user