summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-08-04 22:14:19 -0400
committerOri Bernstein <ori@eigenstate.org>2014-08-04 22:14:19 -0400
commit545ee279bf3bee642c0cc97c2fef4a699f96393f (patch)
treedb850f8f5a121a3766f3cadf151733fb28a7ba7b
parent311adc5c21b028429114abd30aa19ef940519265 (diff)
downloadmc-545ee279bf3bee642c0cc97c2fef4a699f96393f.tar.gz
Don't print 'tynil' in ucons.
-rw-r--r--parse/type.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse/type.c b/parse/type.c
index ef7035c..dd895dc 100644
--- a/parse/type.c
+++ b/parse/type.c
@@ -444,7 +444,8 @@ static int fmtunion(char *buf, size_t len, Type *t)
p += snprintf(p, end - p, "union ");
for (i = 0; i < t->nmemb; i++) {
name = namestr(t->udecls[i]->name);
- ty = tystr(t->udecls[i]->etype);
+ if (t->udecls[i]->etype)
+ ty = tystr(t->udecls[i]->etype);
p += snprintf(p, end - p, "`%s %s; ", name, ty);
free(ty);
}