aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cn-cbor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cn-cbor.c b/src/cn-cbor.c
index a7677ae..8fadf73 100644
--- a/src/cn-cbor.c
+++ b/src/cn-cbor.c
@@ -52,7 +52,7 @@ static double decode_half(int half) {
/* Fix these if you can't do non-aligned reads */
#define ntoh8p(p) (*(unsigned char*)(p))
#define ntoh16p(p) (ntohs(*(unsigned short*)(p)))
-#define ntoh32p(p) (ntohl(*(unsigned long*)(p)))
+#define ntoh32p(p) (ntohl(*(uint32_t*)(p)))
static uint64_t ntoh64p(unsigned char *p) {
uint64_t ret = ntoh32p(p);
ret <<= 32;