Skip to content

Commit 9931667

Browse files
spacewanderthibaultcha
authored andcommitted
bugfix: we now only apply the lightuserdata mask on platforms that are at least 64bits.
1 parent f88d2b4 commit 9931667

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lua_cjson.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,14 @@
9393
#define strcasecmp _stricmp
9494
#endif
9595

96+
#if LONG_MAX > ((1UL << 31) - 1)
9697
#define json_lightudata_mask(ludata) \
9798
((void *) ((uintptr_t) (ludata) & ((1UL << 47) - 1)))
9899

100+
#else
101+
#define json_lightudata_mask(ludata) (ludata)
102+
#endif
103+
99104
static const char * const *json_empty_array;
100105
static const char * const *json_array;
101106

0 commit comments

Comments
 (0)