-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,12 +118,16 @@ 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++;
}