Fix shader function calls being assignable

This commit is contained in:
Mason Ashbridge 2017-08-23 14:55:03 -04:00
parent eb238a04da
commit 3757cec8f3
1 changed files with 6 additions and 0 deletions

View File

@ -1041,6 +1041,12 @@ bool ShaderLanguage::_validate_operator(OperatorNode *p_op, DataType *r_ret_type
} }
} break; } break;
case OP_ASSIGN: { 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 na = p_op->arguments[0]->get_datatype();
DataType nb = p_op->arguments[1]->get_datatype(); DataType nb = p_op->arguments[1]->get_datatype();
valid = na == nb; valid = na == nb;