aboutsummaryrefslogtreecommitdiffstats
path: root/dos/syslinux.c
diff options
context:
space:
mode:
Diffstat (limited to 'dos/syslinux.c')
-rw-r--r--dos/syslinux.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/dos/syslinux.c b/dos/syslinux.c
index 77742120..31fb9050 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------- *
*
- * Copyright 1998-2004 H. Peter Anvin - All Rights Reserved
+ * Copyright 1998-2007 H. Peter Anvin - All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -603,11 +603,18 @@ int main(int argc, char *argv[])
new_ldlinux_name[2] = '\\';
for (sd = subdir; *sd; sd++) {
- if (*sd == '/' || *sd == '\\') {
+ char c = *sd;
+
+ if (c == '/' || c == '\\') {
if (slash)
continue;
- *cp++ = '\\';
+ c = '\\';
+ slash = 1;
+ } else {
+ slash = 0;
}
+
+ *cp++ = c;
}
/* Skip if subdirectory == root */