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
Tomasz Sowa 2021-03-18 17:55:30 +01:00
parent 539faa4976
commit 1c643a08b0
1 changed files with 5 additions and 0 deletions

View File

@ -323,6 +323,11 @@ void SpaceParser::ParseRootSpace()
Parse(root_space, false, false);
if( lastc != -1 )
status = syntax_error;