Fix shader crash when assigning array to non-array in global constant
This commit is contained in:
parent
2f8cb1547c
commit
be7c03779a
|
@ -8452,7 +8452,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
|
|||
|
||||
constant.initializer = static_cast<ConstantNode *>(expr);
|
||||
|
||||
if (!_compare_datatypes(type, struct_name, 0, expr->get_datatype(), expr->get_datatype_name(), 0)) {
|
||||
if (!_compare_datatypes(type, struct_name, 0, expr->get_datatype(), expr->get_datatype_name(), expr->get_array_size())) {
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue