From: Nick Clifton Date: Mon, 13 Aug 2001 10:43:29 +0000 (+0000) Subject: Fix bug in previous delta X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fbad9a25dbf090074a4efa848f7ca097b0382ef9;p=binutils-gdb.git Fix bug in previous delta --- diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 0a5ccdf5976..5e89473a45e 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -523,9 +523,11 @@ v850_elf_reloc_type_lookup (abfd, code) for (i = ARRAY_SIZE (v850_elf_reloc_map); i --;) if (v850_elf_reloc_map[i].bfd_reloc_val == code) { - BFD_ASSERT (v850_elf_howto_table[code].type == v850_elf_reloc_map[i].elf_reloc_val); + int elf_reloc_val = v850_elf_reloc_map[i].elf_reloc_val; + + BFD_ASSERT (v850_elf_howto_table[elf_reloc_val].type == elf_reloc_val); - return v850_elf_howto_table + code; + return v850_elf_howto_table + elf_reloc_val; } return NULL;