diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-27 02:11:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-27 02:11:46 +0200 |
commit | 9c71da00aa02680659131656f662462f37235bd3 (patch) | |
tree | be02baa2d4aea9d54d8a947515ec9298def2c11c /servers | |
parent | 6e7f0190ee6d49f4f1059882b18430d947e0fe48 (diff) | |
parent | 3757cec8f3abb5c65511391f43397145b8ca3f47 (diff) |
Merge pull request #10590 from MasonAsh/fix-10589
Fix shader function calls being assignable
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/shader_language.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 3e0a1a6f45..7146814cbe 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; |