improves the XBoard handling of the engine command line
[xboard.git] / xboard.c
index 3f1983d..c9546e2 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -7572,8 +7572,11 @@ int StartChildProcess(cmdLine, dir, pr)
     strcpy(buf, cmdLine);
     p = buf;
     for (;;) {
+       while(*p == ' ') p++;
        argv[i++] = p;
-       p = strchr(p, ' ');
+       if(*p == '"' || *p == '\'')
+            p = strchr(++argv[i-1], *p);
+       else p = strchr(p, ' ');
        if (p == NULL) break;
        *p++ = NULLCHAR;
     }