From fe536c0631a0c5f5c00870f0e73ffc0fa11956a7 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Fri, 23 Mar 2007 05:04:38 +0000 Subject: [PATCH] [1587188]Fixed parsing of comment at tail of object. --- src/lib_json/json_reader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 9d0e66566..2a4180d79 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -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; }