]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix compile time error building windmc, detected by gcc 11.
authorNick Clifton <nickc@redhat.com>
Mon, 5 Oct 2020 15:09:00 +0000 (16:09 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 5 Oct 2020 15:09:00 +0000 (16:09 +0100)
PR 26698
* windmc.c (mc_unify_path): Fix typo checking character at end of
pathname.

binutils/ChangeLog
binutils/windmc.c

index 9d906649f0abad3bb107448d4b8a2e8683668bc3..f5411e3fb3ab998d6efdf0de114d1cf8e7d79d6c 100644 (file)
@@ -1,3 +1,9 @@
+2020-10-05  Nick Clifton  <nickc@redhat.com>
+
+       PR 26698
+       * windmc.c (mc_unify_path): Fix typo checking character at end of
+       pathname.
+
 2020-10-05  Samanta Navarro  <ferivoz@riseup.net>
 
        * doc/binutils.texi: Fix spelling mistakes.
index 98bb3ad6908dc7f25156b895170c5862b4f4b83d..3b9d2aa48f191a5e21cbfb5633fc98704a1417b8 100644 (file)
@@ -924,7 +924,7 @@ mc_unify_path (const char *path)
   hsz = xmalloc (strlen (path) + 2);
   strcpy (hsz, path);
   end = hsz + strlen (hsz);
-  if (hsz[-1] != '/' && hsz[-1] != '\\')
+  if (end[-1] != '/' && end[-1] != '\\')
     strcpy (end, "/");
   while ((end = strchr (hsz, '\\')) != NULL)
     *end = '/';