summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2020-02-01 12:34:02 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2020-02-01 12:38:52 +0300
commit2c4367441cf00442b9e841d98feefb99fc06ab75 (patch)
tree541a3d1996db6ce94061b4f89e657f5403bf3a5d /servers/visual
parent188dc714b000bbdb086513dcff3dd4bc4f75a0e7 (diff)
Prevent shader crash when name conflict with "dus" and "__" occured
Diffstat (limited to 'servers/visual')
-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);
}