aboutsummaryrefslogtreecommitdiff
path: root/subhook_x86.c
diff options
context:
space:
mode:
authorZeex <zeex@rocketmail.com>2018-09-07 00:01:32 +0600
committerZeex <zeex@rocketmail.com>2018-09-07 00:01:32 +0600
commitf348fb52a83438a20223c25b2f149039f9a2d32b (patch)
treef16f84196a4c3becf3f7352073ca123d266e2db7 /subhook_x86.c
parent6cc020b2fd950264cba0decd7d5d986c8a3fe768 (diff)
downloadsubhook-f348fb52a83438a20223c25b2f149039f9a2d32b.zip
subhook-f348fb52a83438a20223c25b2f149039f9a2d32b.tar.gz
subhook-f348fb52a83438a20223c25b2f149039f9a2d32b.tar.bz2
Improve ABS() macro
Diffstat (limited to 'subhook_x86.c')
-rw-r--r--subhook_x86.c2
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