From c8e9937e21aa77de07316757667ed87dc2cc141e Mon Sep 17 00:00:00 2001 From: Geequlim Date: Sun, 15 Jan 2017 16:59:02 +0800 Subject: [PATCH] Fix error while JSON::parse with empty string --- core/io/json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/json.cpp b/core/io/json.cpp index c0aa530a123..ac5b8f1e5f6 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': {