fixed: SpaceParser was using space->set_empty_object() when parsing a space

and it cleared all values if not an empty object was provided to the set_space() method
This commit is contained in:
Tomasz Sowa 2021-05-21 00:26:19 +02:00
parent 59d4c9a9c8
commit abeca010cc
1 changed files with 3 additions and 4 deletions

View File

@ -407,7 +407,9 @@ void SpaceParser::ParseSpace(Space * space)
ReadChar(); // inserting a next character after the space_start char to lastc
}
space->set_empty_object();
if( !space->is_object() )
space->set_empty_object();
ParseKeyValuePairs(space);
if( need_space_start_character )
@ -496,9 +498,6 @@ void SpaceParser::ParseFloatingPointValue(Space * space)
void SpaceParser::ParseTable(Space * space)
{
space->set_empty_table();
ReadChar(); // inserting a next character after the table_start char to lastc
space->set_empty_table();
ParseValuesList(space);