aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.c
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2005-08-25 05:10:22 +0000
committerKaz Kojima <kkojima@rr.iij4u.or.jp>2005-08-25 05:10:22 +0000
commit4195f552a6513934bddcd64d1c8f59829151d6e8 (patch)
treec149d631d822beac0e484435071b972dbc0e3780 /bfd/elf32-sh.c
parent843fe662b9589a111d4ac7cb8f94e79a7326b0e8 (diff)
downloadgdb-4195f552a6513934bddcd64d1c8f59829151d6e8.zip
gdb-4195f552a6513934bddcd64d1c8f59829151d6e8.tar.gz
gdb-4195f552a6513934bddcd64d1c8f59829151d6e8.tar.bz2
* elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
Diffstat (limited to 'bfd/elf32-sh.c')
-rw-r--r--bfd/elf32-sh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 7bee661..b2b7c6b 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -6655,7 +6655,7 @@ sh_elf_set_mach_from_flags (bfd *abfd)
int
sh_elf_get_flags_from_mach (unsigned long mach)
{
- int i = ARRAY_SIZE (sh_ef_bfd_table);
+ int i = ARRAY_SIZE (sh_ef_bfd_table) - 1;
for (; i>0; i--)
if (sh_ef_bfd_table[i] == mach)