Fix shader crash if using multiple underscores in identifier names

This commit is contained in:
Yuri Roubinsky 2020-01-31 09:11:17 +03:00
parent 4e7d75ccd3
commit 15358b808b
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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
}