aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-10-05 16:09:00 +0100
committerNick Clifton <nickc@redhat.com>2020-10-05 16:09:00 +0100
commit1f1845d435fd0886f5c5561df8922268d2dfaefc (patch)
treeb9d4e1cb06b86a2fb3ce006d57b91886c8fa8632 /binutils
parentf9b1d75e91cddd4d44bea7f56781576ae522c0ea (diff)
downloadgdb-1f1845d435fd0886f5c5561df8922268d2dfaefc.zip
gdb-1f1845d435fd0886f5c5561df8922268d2dfaefc.tar.gz
gdb-1f1845d435fd0886f5c5561df8922268d2dfaefc.tar.bz2
Fix compile time error building windmc, detected by gcc 11.
PR 26698 * windmc.c (mc_unify_path): Fix typo checking character at end of pathname.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/windmc.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 9d90664..f5411e3 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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.
diff --git a/binutils/windmc.c b/binutils/windmc.c
index 98bb3ad..3b9d2aa 100644
--- a/binutils/windmc.c
+++ b/binutils/windmc.c
@@ -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 = '/';