diff options
author | Zeex <zeex@rocketmail.com> | 2018-09-07 00:01:32 +0600 |
---|---|---|
committer | Zeex <zeex@rocketmail.com> | 2018-09-07 00:01:32 +0600 |
commit | f348fb52a83438a20223c25b2f149039f9a2d32b (patch) | |
tree | f16f84196a4c3becf3f7352073ca123d266e2db7 /subhook_x86.c | |
parent | 6cc020b2fd950264cba0decd7d5d986c8a3fe768 (diff) | |
download | subhook-f348fb52a83438a20223c25b2f149039f9a2d32b.zip subhook-f348fb52a83438a20223c25b2f149039f9a2d32b.tar.gz subhook-f348fb52a83438a20223c25b2f149039f9a2d32b.tar.bz2 |
Improve ABS() macro
Diffstat (limited to 'subhook_x86.c')
-rw-r--r-- | subhook_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subhook_x86.c b/subhook_x86.c index a9342ee..8351cfa 100644 --- a/subhook_x86.c +++ b/subhook_x86.c @@ -50,7 +50,7 @@ #include <stdint.h> #endif -#define ABS(x) ((x) > 0 ? (x) : (-(x))) +#define ABS(x) ((x) >= 0 ? (x) : -(x)) #define MAX_INSN_LEN 15 /* maximum length of x86 instruction */ #define JMP_OPCODE 0xE9 |