diff options
Diffstat (limited to 'gdb/bfin-tdep.c')
-rw-r--r-- | gdb/bfin-tdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index 3afa7bc..1d48225 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -566,8 +566,8 @@ bfin_push_dummy_call (struct gdbarch *gdbarch, static int bfin_reg_to_regnum (struct gdbarch *gdbarch, int reg) { - if (reg > ARRAY_SIZE (map_gcc_gdb)) - return 0; + if (reg < 0 || reg >= ARRAY_SIZE (map_gcc_gdb)) + return -1; return map_gcc_gdb[reg]; } |