Skip to content

Commit

Permalink
issue-40396 - Added missing error strings to JSON parsing when array …
Browse files Browse the repository at this point in the history
…or object is never closed.
  • Loading branch information
adam-bates committed Jul 22, 2020
1 parent 0cd98ec commit 8f84dfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/io/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ Error JSON::_parse_array(Array &array, const CharType *p_str, int &index, int p_
need_comma = true;
}

r_err_str = "Expected ']'";
return ERR_PARSE_ERROR;
}

Expand Down Expand Up @@ -433,6 +434,7 @@ Error JSON::_parse_object(Dictionary &object, const CharType *p_str, int &index,
}
}

r_err_str = "Expected '}'";
return ERR_PARSE_ERROR;
}

Expand Down

0 comments on commit 8f84dfa

Please sign in to comment.