aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index b08ce838..c449aa32 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -111,8 +111,8 @@ typedef struct {
} while (0)
#define NNI_GET16(ptr, v) \
- v = (((uint32_t)((uint8_t)(ptr)[0])) << 8) + \
- (((uint32_t)(uint8_t)(ptr)[1]))
+ v = (((uint16_t)((uint8_t)(ptr)[0])) << 8) + \
+ (((uint16_t)(uint8_t)(ptr)[1]))
#define NNI_GET32(ptr, v) \
v = (((uint32_t)((uint8_t)(ptr)[0])) << 24) + \