aboutsummaryrefslogtreecommitdiff
path: root/bfd/format.c
diff options
context:
space:
mode:
authorDavid MacKenzie <djm@cygnus>1994-01-26 21:53:55 +0000
committerDavid MacKenzie <djm@cygnus>1994-01-26 21:53:55 +0000
commitd6d4e4c3d094eb34d807fa6d94bd04859ca003ff (patch)
tree44a0b3003e9cdef04e3ab843991af8c298fd9bd2 /bfd/format.c
parent03372cf4abef13c31f3650617e60398612b1ddb6 (diff)
downloadgdb-d6d4e4c3d094eb34d807fa6d94bd04859ca003ff.zip
gdb-d6d4e4c3d094eb34d807fa6d94bd04859ca003ff.tar.gz
gdb-d6d4e4c3d094eb34d807fa6d94bd04859ca003ff.tar.bz2
* format.c (bfd_check_format_matches): Put the new entry in the
correct element of matching_vector.
Diffstat (limited to 'bfd/format.c')
-rw-r--r--bfd/format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/format.c b/bfd/format.c
index c7d994e..fb9fdc0 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -177,23 +177,23 @@ bfd_check_format_matches (abfd, format, matching)
temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
if (temp) { /* This format checks out as ok! */
right_targ = temp;
- match_count++;
if (matching)
{
matching_vector[match_count] = temp->name;
- matching_vector[match_count] = NULL;
+ matching_vector[match_count + 1] = NULL;
}
+ match_count++;
/* If this is the default target, accept it, even if other targets
might match. People who want those other targets have to set
the GNUTARGET variable. */
if (temp == bfd_default_vector[0])
{
- match_count = 1;
if (matching)
{
matching_vector[0] = temp->name;
matching_vector[1] = NULL;
}
+ match_count = 1;
break;
}
#ifdef GNU960