[gamecode] Use designated initializer syntax for structs

Mostly for consistency with arrays, but also it may be useful for
cutting and pasting data.
This commit is contained in:
Bill Currie 2024-02-18 14:06:46 +09:00
parent 4576de816d
commit d7a1bb5a01

View file

@ -1563,7 +1563,7 @@ pr_dump_struct (qfot_type_t *type, pr_type_t *value, void *_data,
qfot_var_t *field = strct->fields + i;
qfot_type_t *val_type = &G_STRUCT (pr, qfot_type_t, field->type);
pr_type_t *val = value + field->offset;
dasprintf (dstr, "%s=", PR_GetString (pr, field->name));
dasprintf (dstr, ".%s=", PR_GetString (pr, field->name));
value_string (data, val_type, val);
if (i < strct->num_fields - 1) {
dstring_appendstr (dstr, ", ");