From 3757cec8f3abb5c65511391f43397145b8ca3f47 Mon Sep 17 00:00:00 2001 From: Mason Ashbridge Date: Wed, 23 Aug 2017 14:55:03 -0400 Subject: [PATCH] Fix shader function calls being assignable --- servers/visual/shader_language.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 3e0a1a6f453..7146814cbef 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -1041,6 +1041,12 @@ bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type } } break; case OP_ASSIGN: { + + if (p_op->arguments[0]->type != Node::TYPE_MEMBER && p_op->arguments[0]->type != Node::TYPE_VARIABLE) { + valid = false; + break; + } + DataType na = p_op->arguments[0]->get_datatype(); DataType nb = p_op->arguments[1]->get_datatype(); valid = na == nb;