summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-12-13 21:19:13 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-12-13 21:19:13 +0300
commit3cbd8ef09806cc595633f6d8092029e63858579a (patch)
treeae0f7a320203aeb71efd6dbed0f1d93dc7365503 /servers/rendering
parent15aea89868d16d0310a229d831e4a347a38dc1c3 (diff)
Fix shader crash when assigned array from struct to a variable by index
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/shader_language.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h
index 6681af2594..b1fe15e702 100644
--- a/servers/rendering/shader_language.h
+++ b/servers/rendering/shader_language.h
@@ -576,7 +576,7 @@ public:
virtual DataType get_datatype() const override { return datatype; }
virtual String get_datatype_name() const override { return String(struct_name); }
- virtual int get_array_size() const override { return array_size; }
+ virtual int get_array_size() const override { return (index_expression || call_expression) ? 0 : array_size; }
virtual bool is_indexed() const override { return index_expression != nullptr || call_expression != nullptr; }
MemberNode() :