diff --git a/libr/util/ctype.c b/libr/util/ctype.c index d935cdea8f..9ad047c393 100644 --- a/libr/util/ctype.c +++ b/libr/util/ctype.c @@ -124,6 +124,8 @@ R_API int r_type_get_bitsize(Sdb *TDB, const char *type) { const char *tmptype; if (!strncmp (type, "struct ", 7)) { tmptype = type + 7; + } else if (!strncmp (type, "union ", 6)) { + tmptype = type + 6; } else { tmptype = type; } diff --git a/shlr/tcc/tccgen.c b/shlr/tcc/tccgen.c index c9c222dfd8..b224c0cfc9 100644 --- a/shlr/tcc/tccgen.c +++ b/shlr/tcc/tccgen.c @@ -983,7 +983,7 @@ static void struct_decl(CType *type, int u) { goto do_decl; } } else { - static char buf[STRING_MAX_SIZE + 1]; + char buf[STRING_MAX_SIZE + 1]; v = anon_sym++; snprintf (buf, sizeof(buf), "%u", v - SYM_FIRST_ANOM); name = buf;