added a test whether we have reach the end of the input string
without this such an input json (incorrect json string as there is no {} characters): "key": "value" would be parsed correctly: "key" would be parsed and the rest would be skipped
This commit is contained in:
parent
539faa4976
commit
1c643a08b0
|
@ -323,6 +323,11 @@ void SpaceParser::ParseRootSpace()
|
||||||
Parse(root_space, false, false);
|
Parse(root_space, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SkipWhite();
|
||||||
|
|
||||||
|
if( lastc != -1 )
|
||||||
|
status = syntax_error;
|
||||||
|
|
||||||
token.clear();
|
token.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue