mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Fix expression initializers for arrays and structs.
This commit is contained in:
parent
76f912c7a1
commit
c06dd776d2
1 changed files with 2 additions and 1 deletions
|
@ -356,7 +356,8 @@ initialize_def (symbol_t *sym, type_t *type, expr_t *init, defspace_t *space,
|
|||
return;
|
||||
if (init->type == ex_nil)
|
||||
convert_nil (init, type);
|
||||
if (is_array (type) || is_struct (type)) {
|
||||
if ((is_array (type) || is_struct (type))
|
||||
&& init->type == ex_block && !init->e.block.result) {
|
||||
init_elements (sym->s.def, init);
|
||||
} else {
|
||||
if (!type_assignable (type, get_type (init))) {
|
||||
|
|
Loading…
Reference in a new issue