summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorAdam Bates <adam@adambates.ca>2020-07-22 15:06:57 -0400
committerAdam Bates <adam@adambates.ca>2020-07-22 15:06:57 -0400
commit8f84dfa91d2eac33625432c0b49364df3251fae4 (patch)
tree9da836ccb76bacdf1c92d2e46142e9dcb4d663f5 /core/io
parent0cd98ec7e13038d09a77cf821e930be79026f943 (diff)
issue-40396 - Added missing error strings to JSON parsing when array or object is never closed.
Diffstat (limited to 'core/io')
-rw-r--r--core/io/json.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/io/json.cpp b/core/io/json.cpp
index 1c603865ad..b90841a5ef 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -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;
}
@@ -433,6 +434,7 @@ Error JSON::_parse_object(Dictionary &object, const CharType *p_str, int &index,
}
}
+ r_err_str = "Expected '}'";
return ERR_PARSE_ERROR;
}