2
0
Эх сурвалжийг харах

Fix shader crash if using multiple underscores in identifier names

Yuri Roubinsky 5 жил өмнө
parent
commit
15358b808b

+ 1 - 1
drivers/gles2/shader_compiler_gles2.cpp

@@ -80,7 +80,7 @@ static String _opstr(SL::Operator p_op) {
 
 static String _mkid(const String &p_id) {
 
-	String id = "m_" + p_id;
+	String id = "m_" + p_id.replace("__", "_dus_");
 	return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
 }
 

+ 1 - 1
drivers/gles3/shader_compiler_gles3.cpp

@@ -166,7 +166,7 @@ static String _opstr(SL::Operator p_op) {
 
 static String _mkid(const String &p_id) {
 
-	String id = "m_" + p_id;
+	String id = "m_" + p_id.replace("__", "_dus_");
 	return id.replace("__", "_dus_"); //doubleunderscore is reserved in glsl
 }