OSDN Git Service

PR 9766
authornickc <nickc>
Mon, 26 Jan 2009 15:52:55 +0000 (15:52 +0000)
committernickc <nickc>
Mon, 26 Jan 2009 15:52:55 +0000 (15:52 +0000)
        * dlltool.c (xlate): When strip text after the @ sign, look for
        the last one not the first one.

binutils/ChangeLog
binutils/dlltool.c

index c549b9f..ececdb0 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-26  Nick Clifton  <nickc@redhat.com>
+
+       PR 9766
+       * dlltool.c (xlate): When strip text after the @ sign, look for
+       the last one not the first one.
+
 2009-01-16  Alan Modra  <amodra@bigpond.net.au>
 
        * configure.in (commonbfdlib): Delete.
index 2c3aa6d..a24a552 100644 (file)
@@ -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;