From 2bb956bb065d82024bd18c4a5c2fdda59f54e89f Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 24 Apr 2021 15:42:05 +0200 Subject: Improved ofconvert function a bit --- src/wrapped/wrappedlibc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 300d0fc7..a4981f58 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -497,7 +497,7 @@ int of_convert(int a) { if(!a || a==-1) return a; int b=0; - #define GO(A) if((a&X86_##A)==X86_##A) {a&=~X86_##A; b|=A;} + #define GO(A) if((a&(X86_##A))==(X86_##A)) {a&=~(X86_##A); b|=(A);} SUPER(); #undef GO if(a) { @@ -511,7 +511,7 @@ int of_unconvert(int a) { if(!a || a==-1) return a; int b=0; - #define GO(A) if((a&A)==A) {a&=~A; b|=X86_##A;} + #define GO(A) if((a&(A))==(A)) {a&=~(A); b|=(X86_##A);} SUPER(); #undef GO if(a) { -- cgit 1.4.1