summaryrefslogtreecommitdiff
path: root/binutils/dlltool.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-01-26 15:52:55 +0000
committerNick Clifton <nickc@redhat.com>2009-01-26 15:52:55 +0000
commitf5842e1a46cfd59b967927595d45ea3daf021b9a (patch)
treec26b1753693313e6fe87393d29c64b1fb50e65ac /binutils/dlltool.c
parent152db691e5f1b7388e644f84a2b557a694933f8c (diff)
downloadbinutils-redhat-f5842e1a46cfd59b967927595d45ea3daf021b9a.tar.gz
PR 9766
* dlltool.c (xlate): When strip text after the @ sign, look for the last one not the first one.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r--binutils/dlltool.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 2c3aa6dc2f..a24a55255f 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -2131,8 +2131,9 @@ xlate (const char *name)
char *p;
name += lead_at;
- p = strchr (name, '@');
- if (p)
+ /* PR 9766: Look for the last @ sign in the name. */
+ p = strrchr (name, '@');
+ if (p && ISDIGIT (p[1]))
*p = 0;
}
return name;