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
Line 1912 of LoadFromBinary reads like this: nlohmann::json::parse(&json[0], &json[header.jsonHeader.chunkLength]),
But json is a vector of exactly size header.jsonHeader.chunkLength, which makes the second access an out of bounds access. This is intended behavior because the code is trying to get a pointer just after the end of the vector, but it is technically illegal (and undefined behavior!), and visual studio throws an exception in when compiling in debug.
The fix is really simple though, we can just change that line to be: nlohmann::json::parse(json.begin(), json.end()),
The text was updated successfully, but these errors were encountered:
Line 1912 of LoadFromBinary reads like this:
nlohmann::json::parse(&json[0], &json[header.jsonHeader.chunkLength]),
But json is a vector of exactly size header.jsonHeader.chunkLength, which makes the second access an out of bounds access. This is intended behavior because the code is trying to get a pointer just after the end of the vector, but it is technically illegal (and undefined behavior!), and visual studio throws an exception in when compiling in debug.
The fix is really simple though, we can just change that line to be:
nlohmann::json::parse(json.begin(), json.end()),
The text was updated successfully, but these errors were encountered: