diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2020-02-01 12:34:02 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2020-02-01 12:38:52 +0300 |
commit | 2c4367441cf00442b9e841d98feefb99fc06ab75 (patch) | |
tree | 541a3d1996db6ce94061b4f89e657f5403bf3a5d /servers/visual | |
parent | 188dc714b000bbdb086513dcff3dd4bc4f75a0e7 (diff) |
Prevent shader crash when name conflict with "dus" and "__" occured
Diffstat (limited to 'servers/visual')
-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); } |