summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/io/json.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/json.cpp b/core/io/json.cpp
index c0aa530a12..ac5b8f1e5f 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': {