diff options
-rw-r--r-- | parse/type.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/parse/type.c b/parse/type.c index 6a29d1d..0e5b059 100644 --- a/parse/type.c +++ b/parse/type.c @@ -557,7 +557,12 @@ static int tybfmt(char *buf, size_t len, Type *t) break; case Tyarray: p += tybfmt(p, end - p, t->sub[0]); - p += snprintf(p, end - p, "[%llu]", t->asize->expr.args[0]->lit.intval); + if (t->asize) { + i = t->asize->expr.args[0]->lit.intval; + p += snprintf(p, end - p, "[%zd]", i); + } else { + p += snprintf(p, end - p, "[]"); + } break; case Tyfunc: p += snprintf(p, end - p, "("); |