aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-03-31 23:44:47 +0000
committerAlan Modra <amodra@gmail.com>2008-03-31 23:44:47 +0000
commit89a58aeb3e133aa6395a1cea49e9933c95708f46 (patch)
tree0b91ccc6e5e122cdb3f81d0b489c4522c0de7abc /bfd/archive.c
parent3ded4dd853311427ce6c112778d07f7d15c2cfba (diff)
downloadfsf-binutils-gdb-89a58aeb3e133aa6395a1cea49e9933c95708f46.zip
fsf-binutils-gdb-89a58aeb3e133aa6395a1cea49e9933c95708f46.tar.gz
fsf-binutils-gdb-89a58aeb3e133aa6395a1cea49e9933c95708f46.tar.bz2
PR 6006
* archive.c (_bfd_slurp_extended_name_table): Change ARFMAG[0] to ARFMAG[1]. (_bfd_construct_extended_name_table): Likewise.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 5389f7a..9861ed9 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1233,7 +1233,7 @@ _bfd_slurp_extended_name_table (bfd *abfd)
char *limit = temp + namedata->parsed_size;
for (; temp < limit; ++temp)
{
- if (*temp == ARFMAG[0])
+ if (*temp == ARFMAG[1])
temp[temp > ext_names && temp[-1] == '/' ? -1 : 0] = '\0';
if (*temp == '\\')
*temp = '/';
@@ -1564,11 +1564,11 @@ _bfd_construct_extended_name_table (bfd *abfd,
{
strcpy (strptr, normal);
if (! trailing_slash)
- strptr[thislen] = ARFMAG[0];
+ strptr[thislen] = ARFMAG[1];
else
{
strptr[thislen] = '/';
- strptr[thislen + 1] = ARFMAG[0];
+ strptr[thislen + 1] = ARFMAG[1];
}
stroff = strptr - *tabloc;
last_stroff = stroff;