Fix shader crash when assigning array to non-array in global constant

This commit is contained in:
Yuri Roubinsky 2021-11-30 21:28:55 +03:00
parent 2f8cb1547c
commit be7c03779a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}