Eliminate continues from GUI loop
[uci2wb.git] / UCI2WB.c
index c068847..d44de74 100644 (file)
--- a/UCI2WB.c
+++ b/UCI2WB.c
@@ -530,13 +530,13 @@ GUI2Engine()
                StopPonder(1); searching = 0;\r
            }\r
            strcpy(move[moveNr++], command); // possibly overwrites ponder move\r
-           continue;\r
-       }\r
+       } else\r
        if(!strcmp(command, "resume")) {\r
            searching = 0;\r
            if(suspended == 2) StartPonder(moveNr); // restart interrupted ponder search\r
-           suspended = 0; continue;  // causes thinking to start in normal way if on move or analyzing\r
-       }\r
+           suspended = 0;  // causes thinking to start in normal way if on move or analyzing\r
+       } else\r
+      {\r
        if(searching == 3) { // command arrived during thinking; order abort for 'instant commands'\r
            if(!strcmp(command, "?") || !strcmp(command, "quit") ||\r
               !strcmp(command, "force") || !strcmp(command, "result")) { EPRINT((f, "# stop\n")); fflush(toE); }\r
@@ -545,6 +545,7 @@ GUI2Engine()
        if(qStart == qEnd) qStart = qEnd = queue;\r
        p = line; while(qEnd < queue+10000 && (*qEnd++ = *p++) != '\n') {}\r
        if(DoCommand()) goto nomove;\r
+      }\r
     }\r
 }\r
 \r