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

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