vivkin / gason

Lightweight and fast JSON parser for C++
MIT License
338 stars 51 forks source link

Stop 32-bit pointer extension #21

Closed ChrisJefferson closed 8 years ago

ChrisJefferson commented 8 years ago

On ARM (maybe other systems), casting a 32-bit pointer to uint64_t is sign extended, so high pointers end up failing this check.

In practice, what we do is cast to uintptr_t, in the next line, so let's actually assert against that.

Fixes 32-bit ARM