Protect the name passed into emit_struct().

The name passed into emit_struct is sometimes created via va(), but the
struct creation code also uses va. This makes a mess of names.
This commit is contained in:
Bill Currie 2011-02-09 17:12:47 +09:00
parent 3e1b034aaf
commit 59a683d39e

View file

@ -223,6 +223,7 @@ emit_structure (const char *name, int su, struct_def_t *defs, type_t *type,
def_t *struct_def;
def_t field_def;
name = save_string (name);
if (!type) {
memset (&new, 0, sizeof (new));
type = &new;