From b35970b9a52fcf09da1087245ec8562e15def5bb Mon Sep 17 00:00:00 2001 From: Adam Bates Date: Wed, 22 Jul 2020 15:06:57 -0400 Subject: [PATCH] issue-40396 - Added missing error strings to JSON parsing when array or object is never closed. (cherry picked from commit 8f84dfa91d2eac33625432c0b49364df3251fae4) --- core/io/json.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/io/json.cpp b/core/io/json.cpp index dbf1676e624..7183213a7c0 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -386,6 +386,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; } @@ -453,6 +454,7 @@ Error JSON::_parse_object(Dictionary &object, const CharType *p_str, int &index, } } + r_err_str = "Expected '}'"; return ERR_PARSE_ERROR; }