Skip to content

Commit 497f146

Browse files
committedJan 12, 2019
Fix pointer size issue
1 parent 596c85f commit 497f146

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎json.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <stdlib.h>
33
#include <string.h>
44
#include <stdio.h>
5+
#include <stdint.h>
56

67
#define is_whitespace(c) ((c)==' ' || (c)=='\t' || (c)=='\n' || (c)=='\r')
78

@@ -239,7 +240,7 @@ static void json_ptr_itr_cb(const char *prop, const char *val, void *arg)
239240
struct JPtrItr *params = (struct JPtrItr*)arg;
240241

241242
if (params && params->prop && !strcmp(params->prop, prop)) {
242-
params->val = (void*)strtoll(val, NULL, 0);
243+
params->val = (void*)(intptr_t)strtoll(val, NULL, 0);
243244
params->found = 1;
244245
}
245246
}

0 commit comments

Comments
 (0)
Please sign in to comment.