$\1 and serious bug in evalling
[p5sagit/p5-mst-13.2.git] / util.c
diff --git a/util.c b/util.c
index 99eb7e0..fb6c0c0 100644 (file)
--- a/util.c
+++ b/util.c
@@ -279,7 +279,9 @@ xstat()
 
 #endif /* LEAKTEST */
 
-/* copy a string up to some (non-backslashed) delimiter, if any */
+/* copy a string up to some (non-backslashed) delimiter, if any;
+   If the delimiter is ';', then do not consider backslashes - 
+   used only for PATH on DOSISH systems. */
 
 char *
 delimcpy(to, toend, from, fromend, delim, retlen)
@@ -292,7 +294,7 @@ I32 *retlen;
 {
     register I32 tolen;
     for (tolen = 0; from < fromend; from++, tolen++) {
-       if (*from == '\\') {
+       if (*from == '\\' && delim != ';') {
            if (from[1] == delim)
                from++;
            else {