mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Fix the source of bogus string relocs.
Nested aggregate initializers were corrupting themselves.
This commit is contained in:
parent
7c95913c61
commit
cfefd79e07
1 changed files with 3 additions and 0 deletions
|
@ -248,6 +248,7 @@ init_elements (struct def_s *def, expr_t *eles)
|
|||
continue;
|
||||
}
|
||||
init_elements (&elements[i], c);
|
||||
continue;
|
||||
} else if (c->type == ex_value) {
|
||||
if (c->e.value.type == ev_integer
|
||||
&& elements[i].type->type == ev_float)
|
||||
|
@ -269,6 +270,8 @@ init_elements (struct def_s *def, expr_t *eles)
|
|||
|
||||
append_expr (local_expr, assign_expr (unary_expr ('.', ptr), c));
|
||||
} else {
|
||||
if (c->type != ex_value)
|
||||
internal_error (c, "bogus expression type in init_elements()");
|
||||
if (c->e.value.type == ev_string) {
|
||||
EMIT_STRING (def->space, g->string_var,
|
||||
c->e.value.v.string_val);
|
||||
|
|
Loading…
Reference in a new issue