From: Kevin Buettner Date: Wed, 19 Mar 2003 06:49:17 +0000 (+0000) Subject: * mips-tdep.c (mips_register_name): Fix fencepost error involving X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b006a9e9ba1e86ef3d865d7b2ae7770c513bc3f5;p=binutils-gdb.git * mips-tdep.c (mips_register_name): Fix fencepost error involving NUM_REGS bounds check. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 31c7b301782..3868d38e8e8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-03-18 Kevin Buettner + + * mips-tdep.c (mips_register_name): Fix fencepost error involving + NUM_REGS bounds check. + 2003-03-18 Kevin Buettner * Makefile.in (mips-tdep.o): Add dependency on $(gdb_assert_h). diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index a011728fef9..d91af124993 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -402,7 +402,7 @@ mips_register_name (int regno) else return mips_gpr_names[regno]; } - else if (32 <= regno && regno <= NUM_REGS) + else if (32 <= regno && regno < NUM_REGS) return mips_processor_reg_names[regno - 32]; else internal_error (__FILE__, __LINE__,