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:
Antonio Niño Díaz
2017-12-31 13:09:08 +01:00
parent 0cbe6abbd5
commit c24cab6d1d
3 changed files with 3 additions and 3 deletions

View File

@@ -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);
}