Commit 9c71da00 by Rémi Verschelde Committed by GitHub

Merge pull request #10590 from MasonAsh/fix-10589

Fix shader function calls being assignable
parents 6e7f0190 3757cec8
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment