diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-04-26 12:34:42 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-04-26 12:34:42 -0300 |
commit | 972af0b0cbe1e67470d6a520233dd1f58f8ae02c (patch) | |
tree | fcdc9f252a78d19ba2c2a9129d232eeb007dc52e /servers | |
parent | 3203a03414873e88bab879245922d57ad965473c (diff) |
-Fixed shader commets, /* */ works well and crash is solved, fixes #1711
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/shader_language.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 5dd2c2e0be..9b1b61dcef 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -118,13 +118,17 @@ ShaderLanguage::Token ShaderLanguage::read_token(const CharType* p_text,int p_le while(true) { - if (GETCHAR(r_chars+1)=='0') + if (GETCHAR(r_chars+1)==0) { + r_chars+=1; break; - if (GETCHAR(r_chars+1)=='*' && GETCHAR(r_chars+2)=='/') + } if (GETCHAR(r_chars+1)=='*' && GETCHAR(r_chars+2)=='/') { + r_chars+=3; break; - if (GETCHAR(r_chars+1)=='\n') + } if (GETCHAR(r_chars+1)=='\n') { r_line++; - r_chars++; + } + + r_chars++; } return Token(); |