Browse Source

Util: Fix trailing comma in Object error message

master
Riyyi 2 years ago
parent
commit
55ed70353a
  1. 2
      src/util/json/parser.cpp

2
src/util/json/parser.cpp

@ -387,7 +387,7 @@ Value Parser::getObject()
if (token.type == Token::Type::BraceClose) {
// Trailing comma
if (object.asObject().size() > 0) {
reportError((*m_tokens)[m_index - 2], "invalid comma, expecting '}'");
reportError((*m_tokens)[m_index - 1], "invalid comma, expecting '}'");
}
// Empty object
break;

Loading…
Cancel
Save