Util: Fix trailing comma in Object error message

This commit is contained in:
Riyyi
2022-07-11 19:33:54 +02:00
parent abb075939f
commit 55ed70353a
+1 -1
View File
@@ -387,7 +387,7 @@ Value Parser::getObject()
if (token.type == Token::Type::BraceClose) { if (token.type == Token::Type::BraceClose) {
// Trailing comma // Trailing comma
if (object.asObject().size() > 0) { 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 // Empty object
break; break;