aboutsummaryrefslogtreecommitdiff
path: root/binutils/windmc.c
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/windmc.c
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/windmc.c')
-rw-r--r--binutils/windmc.c2
1 files changed, 1 insertions, 1 deletions
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 = '/';