Merge pull request #35769 from Chaosus/shader_fix_crash

Fix shader crash if using multiple underscores in identifier names
This commit is contained in:
Rémi Verschelde 2020-01-31 08:13:04 +01:00 committed by GitHub
commit fbba94fb01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}