Skip to content

Commit

Permalink
Fixed group name getting function
Browse files Browse the repository at this point in the history
  • Loading branch information
fotisl committed Apr 17, 2017
1 parent 03de8c6 commit a6111df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/TMS320C64x/TMS320C64xMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,9 +1766,16 @@ static name_map group_name_maps[] = {
const char *TMS320C64x_group_name(csh handle, unsigned int id)
{
#ifndef CAPSTONE_DIET
unsigned int i;

if (id >= TMS320C64X_GRP_ENDING)
return NULL;

for (i = 0; i < ARR_SIZE(group_name_maps); i++) {
if (group_name_maps[i].id == id)
return group_name_maps[i].name;
}

return group_name_maps[id].name;
#else
return NULL;
Expand Down

0 comments on commit a6111df

Please sign in to comment.