Skip to content

Commit

Permalink
Read the right array in cleanup debug printing
Browse files Browse the repository at this point in the history
This fixes crashes in certain cases.
  • Loading branch information
mstorsjo committed Aug 5, 2014
1 parent 603d380 commit a80ccef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,7 @@ static void cleanup(void)
typedefs[n].struct_decl_idx);
}
} else if (typedefs[n].enum_decl_idx != (unsigned) -1) {
if (structs[typedefs[n].enum_decl_idx].name[0]) {
if (enums[typedefs[n].enum_decl_idx].name[0]) {
dprintf("[%d]: %s (enum %s = %d)\n",
n, typedefs[n].name,
enums[typedefs[n].enum_decl_idx].name,
Expand Down

0 comments on commit a80ccef

Please sign in to comment.