diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 19:41:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-11-18 19:41:46 -0300 |
commit | 63e84e18241276aace45619a4e421302914a14d4 (patch) | |
tree | de6c8fdca2861e2528cb1b937c99662127d115dc | |
parent | f0aeb036d1662b45f009e6ad1836dfd8a21c1181 (diff) | |
parent | f59a1fd50d3e2df4ea9fa9e43544c2886ebc78f1 (diff) |
Merge pull request #2798 from bojidar-bg/patch-6
Change handling of invalid JSON escape sequences.
-rw-r--r-- | core/io/json.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/io/json.cpp b/core/io/json.cpp index 14890abd26..22c99d0465 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -177,9 +177,6 @@ Error JSON::_get_token(const CharType *p_str, int &idx, int p_len, Token& r_toke case 'n': res=10; break; case 'f': res=12; break; case 'r': res=13; break; - case '\"': res='\"'; break; - case '\\': res='\\'; break; - case '/': res='/'; break; //wtf case 'u': { //hexnumbarh - oct is deprecated @@ -218,10 +215,13 @@ Error JSON::_get_token(const CharType *p_str, int &idx, int p_len, Token& r_toke } break; + //case '\"': res='\"'; break; + //case '\\': res='\\'; break; + //case '/': res='/'; break; default: { - - r_err_str="Invalid escape sequence"; - return ERR_PARSE_ERROR; + res = next; + //r_err_str="Invalid escape sequence"; + //return ERR_PARSE_ERROR; } break; } |