You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~7u will generate a 32-bit bitmask (FFFF FFF8), thus giving incorrect values when x > 2^32 (4 GB).
For example, passing x = 4,901,136,555 will return 606,169,264
~7u should be changed to ~7llu (or ~7ull) to generate a 64-bit bitmask instead.
(Tested on VisualStudio 2012)
The text was updated successfully, but these errors were encountered:
In rapidjson.h, with this definition:
ifndef RAPIDJSON_ALIGN
if RAPIDJSON_64BIT == 1
define RAPIDJSON_ALIGN(x) ((x + 7u) & ~7u)
~7u will generate a 32-bit bitmask (FFFF FFF8), thus giving incorrect values when x > 2^32 (4 GB).
For example, passing x = 4,901,136,555 will return 606,169,264
~7u should be changed to ~7llu (or ~7ull) to generate a 64-bit bitmask instead.
(Tested on VisualStudio 2012)
The text was updated successfully, but these errors were encountered: