From a86c84f599c900ea45f7db74b4f9e03c45ead3e8 Mon Sep 17 00:00:00 2001 From: Andrei Vlad LUTAS Date: Tue, 28 May 2024 23:19:20 +0300 Subject: [PATCH] Added missing paranthesis around macro parameter. --- inc/bdx86_core.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/bdx86_core.h b/inc/bdx86_core.h index af33244..c420e1f 100644 --- a/inc/bdx86_core.h +++ b/inc/bdx86_core.h @@ -373,10 +373,10 @@ typedef ND_UINT32 ND_REG_SIZE; // Sets the sign of the sz bytes long value x. #define ND_SET_SIGN(sz, x) ND_SIGN_EX(sz, x) -#define ND_FETCH_64(b) (((ND_UINT64)ND_FETCH_32((ND_UINT8 *)b)) | (((ND_UINT64)ND_FETCH_32((ND_UINT8 *)b + 4) << 32))) -#define ND_FETCH_32(b) (((ND_UINT32)ND_FETCH_16((ND_UINT8 *)b)) | (((ND_UINT32)ND_FETCH_16((ND_UINT8 *)b + 2) << 16))) -#define ND_FETCH_16(b) (((ND_UINT16)ND_FETCH_8 ((ND_UINT8 *)b)) | (((ND_UINT16)ND_FETCH_8 ((ND_UINT8 *)b + 1) << 8))) -#define ND_FETCH_8(b) (*((ND_UINT8 *)b)) +#define ND_FETCH_64(b) (((ND_UINT64)ND_FETCH_32((ND_UINT8 *)(b))) | (((ND_UINT64)ND_FETCH_32((ND_UINT8 *)(b) + 4) << 32))) +#define ND_FETCH_32(b) (((ND_UINT32)ND_FETCH_16((ND_UINT8 *)(b))) | (((ND_UINT32)ND_FETCH_16((ND_UINT8 *)(b) + 2) << 16))) +#define ND_FETCH_16(b) (((ND_UINT16)ND_FETCH_8 ((ND_UINT8 *)(b))) | (((ND_UINT16)ND_FETCH_8 ((ND_UINT8 *)(b) + 1) << 8))) +#define ND_FETCH_8(b) (*((ND_UINT8 *)(b)))