diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-09-19 18:39:50 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-09-19 18:39:50 -0300 |
commit | 549d344f0fef5e5748ded69b6a037698ff55f8bc (patch) | |
tree | a22ee2a3b0d6303fe3e4348831e7f581dd8a0a07 /modules/gdscript/gd_tokenizer.cpp | |
parent | 526aae62edfa31aa156d604e8b25caab512c6bff (diff) |
Fixing Issues...
- #672 (default user:// in $HOME/.godot/app_userdata (linux/osx) and $APPDATA/Godot/app_userdata (Windows)
- #676 (draw both tiles and octants in order from top to bottom, left to right )
- #686 (unicode escape sequences work now)
- #702 (was not a bug, but a test was added to see if bodies went too far away)
Diffstat (limited to 'modules/gdscript/gd_tokenizer.cpp')
-rw-r--r-- | modules/gdscript/gd_tokenizer.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index f73c895d74..bd0beb3138 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -565,22 +565,21 @@ void GDTokenizerText::_advance() { case '\'': res='\''; break; case '\"': res='\"'; break; case '\\': res='\\'; break; - case 'x': { - //hexnumbarh - oct is deprecated + case '/': res='/'; break; //wtf - int read=0; + case 'u': { + //hexnumbarh - oct is deprecated + i+=1; for(int j=0;j<4;j++) { CharType c = GETCHAR(i+j); if (c==0) { _make_error("Unterminated String"); return; } - if (!_is_hex(c)) { - if (j==0 || !(j&1)) { - _make_error("Malformed hex constant in string"); - return; - } else - break; + if (!((c>='0' && c<='9') || (c>='a' && c<='f') || (c>='A' && c<='F'))) { + + _make_error("Malformed hex constant in string"); + return; } CharType v; if (c>='0' && c<='9') { @@ -599,10 +598,9 @@ void GDTokenizerText::_advance() { res<<=4; res|=v; - read++; - } - i+=read-1; + } + i+=3; } break; default: { |