From: Kaz Kojima Date: Thu, 25 Aug 2005 05:10:22 +0000 (+0000) Subject: * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4195f552a6513934bddcd64d1c8f59829151d6e8;p=binutils-gdb.git * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f24769324d7..19402870f39 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2005-08-25 Kaz Kojima + + * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error. + 2005-08-24 H.J. Lu PR ld/1208 diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 7bee661b154..b2b7c6be918 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)