mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-26 10:41:03 +08:00
[1587188]Fixed parsing of comment at tail of object.
This commit is contained in:
parent
3ffbf208a0
commit
fe536c0631
@ -395,12 +395,17 @@ Reader::readObject( Token &tokenStart )
|
||||
Token comma;
|
||||
if ( !readToken( comma )
|
||||
|| ( comma.type_ != tokenObjectEnd &&
|
||||
comma.type_ != tokenArraySeparator ) )
|
||||
comma.type_ != tokenArraySeparator &&
|
||||
comma.type_ != tokenComment ) )
|
||||
{
|
||||
return addErrorAndRecover( "Missing ',' or '}' in object declaration",
|
||||
comma,
|
||||
tokenObjectEnd );
|
||||
}
|
||||
bool finalizeTokenOk = true;
|
||||
while ( comma.type_ == tokenComment &&
|
||||
finalizeTokenOk )
|
||||
finalizeTokenOk = readToken( comma );
|
||||
if ( comma.type_ == tokenObjectEnd )
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user