JSON parser wasn't handling ulong values correctly.

It passed all scalar ints thru a int64_t, which would truncate
uint64_t values with the upper bit set.

Change-Id: I38fb8c68c911ae44d9863f8e35c2429ca0ab51e5
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2017-01-30 17:07:55 -08:00
parent 2dd6ba57d1
commit 29574282a2
4 changed files with 35 additions and 20 deletions

View File

@@ -520,7 +520,7 @@ class Parser : public ParserState {
private:
FLATBUFFERS_CHECKED_ERROR Error(const std::string &msg);
FLATBUFFERS_CHECKED_ERROR ParseHexNum(int nibbles, int64_t *val);
FLATBUFFERS_CHECKED_ERROR ParseHexNum(int nibbles, uint64_t *val);
FLATBUFFERS_CHECKED_ERROR Next();
FLATBUFFERS_CHECKED_ERROR SkipByteOrderMark();
bool Is(int t);