diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2020-02-01 13:14:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-01 13:14:59 +0300 |
commit | f26e2f65cd4af638a5e64a42aa519abc9cde6604 (patch) | |
tree | 541a3d1996db6ce94061b4f89e657f5403bf3a5d | |
parent | 188dc714b000bbdb086513dcff3dd4bc4f75a0e7 (diff) | |
parent | 2c4367441cf00442b9e841d98feefb99fc06ab75 (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.cpp | 2 |
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); } |