Use the correct type object in emit_struct().

This commit is contained in:
Bill Currie 2011-02-09 17:15:29 +09:00
parent 59a683d39e
commit 29c1f7ac03
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ emit_structure (const char *name, int su, struct_def_t *defs, type_t *type,
if (!type) { if (!type) {
memset (&new, 0, sizeof (new)); memset (&new, 0, sizeof (new));
type = &new; type = &new;
make_structure (0, su, defs, type); type = make_structure (0, su, defs, type)->type;
} }
if (!is_struct (type) || (su == 's' && type->ty != ty_struct) if (!is_struct (type) || (su == 's' && type->ty != ty_struct)
|| (su == 'u' && type->ty != ty_union)) || (su == 'u' && type->ty != ty_union))