Browse Source

Prevent shader crash when name conflict with "dus" and "__" occured

Yuri Roubinsky 5 years ago
parent
commit
2c4367441c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      servers/visual/shader_language.cpp

+ 2 - 0
servers/visual/shader_language.cpp

@@ -662,6 +662,8 @@ ShaderLanguage::Token ShaderLanguage::_get_token() {
 						idx++;
 					}
 
+					str = str.replace("dus_", "_");
+
 					return _make_token(TK_IDENTIFIER, str);
 				}