diff options
author | hurikhan <m4r10.5ch14ck@gmail.com> | 2015-03-08 15:10:48 +0800 |
---|---|---|
committer | hurikhan <m4r10.5ch14ck@gmail.com> | 2015-03-08 15:10:48 +0800 |
commit | 87be945d49e1f53a34f7e4a27fa9b17e527b43c4 (patch) | |
tree | c1fb9e1ac10bac08c25c31bbf3a29848b90a4c49 /modules/gdscript | |
parent | f5d2e1f42cca1c5b078073133fccda63c556a0da (diff) | |
parent | 2c2894ceb674927a35d2798b3e63adabdb020077 (diff) |
Merge remote-tracking branch 'upstream/master' into x11-window-management
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gd_script.cpp | 5 | ||||
-rw-r--r-- | modules/gdscript/gd_tokenizer.cpp | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 0aa115ffbc..d3a9abf4b7 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -2696,7 +2696,10 @@ Error ResourceFormatSaverGDScript::save(const String &p_path,const RES& p_resour } file->store_string(source); - + if (file->get_error()!=OK && file->get_error()!=ERR_FILE_EOF) { + memdelete(file); + return ERR_CANT_CREATE; + } file->close(); memdelete(file); return OK; diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index 6f968f2080..1979577a17 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -538,9 +538,12 @@ void GDTokenizerText::_advance() { is_node_path=true; case '\'': - string_mode=STRING_SINGLE_QUOTE; case '"': { - + + if (GETCHAR(0)=='\'') + string_mode=STRING_SINGLE_QUOTE; + + int i=1; if (string_mode==STRING_DOUBLE_QUOTE && GETCHAR(i)=='"' && GETCHAR(i+1)=='"') { i+=2; |