Don't trip over incomplete structs (again:P)

This commit is contained in:
Bill Currie 2011-02-03 21:31:14 +09:00
parent 12d8658ece
commit 54c8a10fe4
1 changed files with 7 additions and 5 deletions

View File

@ -409,11 +409,13 @@ print_type_str (dstring_t *str, type_t *type)
{
const char *tag = "struct";
if (type->t.symtab) {//FIXME
if (type->t.symtab->type == stab_union)
tag = "union";
else if (type->t.symtab->type == stab_union)
tag = "enum";
dasprintf (str, " %s %s", tag, type->name);//FIXME
}
dasprintf (str, " %s %s", tag, type->name);
}
break;
case ty_array: