Fix shader crash when assigning array to non-array in global constant
This commit is contained in:
@ -8452,7 +8452,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
|
|||||||
|
|
||||||
constant.initializer = static_cast<ConstantNode *>(expr);
|
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;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user