-Fixed shader commets, /* */ works well and crash is solved, fixes #1711

This commit is contained in:
Juan Linietsky 2015-04-26 12:34:42 -03:00
parent 3203a03414
commit 972af0b0cb

View File

@ -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();