summaryrefslogtreecommitdiff
path: root/core/io/json.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/json.cpp')
-rw-r--r--core/io/json.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/io/json.cpp b/core/io/json.cpp
index c0aa530a12..5ade25aab4 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -100,7 +100,7 @@ String JSON::print(const Variant& p_var) {
Error JSON::_get_token(const CharType *p_str, int &idx, int p_len, Token& r_token,int &line,String &r_err_str) {
- while (true) {
+ while (p_len > 0) {
switch(p_str[idx]) {
case '\n': {
@@ -374,7 +374,7 @@ Error JSON::_parse_array(Array &array,const CharType *p_str,int &index, int p_le
}
- return OK;
+ return ERR_PARSE_ERROR;
}
@@ -446,7 +446,7 @@ Error JSON::_parse_object(Dictionary &object,const CharType *p_str,int &index, i
}
}
- return OK;
+ return ERR_PARSE_ERROR;
}