summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2020-02-01 13:14:59 +0300
committerGitHub <noreply@github.com>2020-02-01 13:14:59 +0300
commitf26e2f65cd4af638a5e64a42aa519abc9cde6604 (patch)
tree541a3d1996db6ce94061b4f89e657f5403bf3a5d
parent188dc714b000bbdb086513dcff3dd4bc4f75a0e7 (diff)
parent2c4367441cf00442b9e841d98feefb99fc06ab75 (diff)
Merge pull request #35818 from Chaosus/fix_shader_crash
Prevent shader crash when name conflict with "dus" and "__" occured
-rw-r--r--servers/visual/shader_language.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index d3ecdf4e59..14d2f6d086 100644
--- a/servers/visual/shader_language.cpp
+++ b/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);
}