Util: Fix empty Object {} parsing

This commit is contained in:
Riyyi
2022-07-12 02:00:49 +02:00
parent a33f35faab
commit 39329caf22
+2 -1
View File
@@ -393,7 +393,7 @@ Value Parser::getObject()
break;
}
token = peek();
token = consume();
if (token.type == Token::Type::BraceClose) {
// Trailing comma
if (object.asObject().size() > 0) {
@@ -408,6 +408,7 @@ Value Parser::getObject()
}
// Find member name
m_index--;
Value tmpName = getString();
if (tmpName.type() != Value::Type::String) {
seekForward(Token::Type::BraceClose);