fix double start of zippy engine after switch to gothic
authorH.G. Muller <h.g.muller@hccnet.nl>
Thu, 19 Nov 2009 03:12:25 +0000 (19:12 -0800)
committerArun Persaud <arun@nubati.net>
Sun, 22 Nov 2009 19:58:33 +0000 (11:58 -0800)
In ICS mode we now switch to the proper variant as soon as we receive
the generic game-start message, to prevent a mismatch when the first
board is received (which would trigger fetching of a move list).

backend.c

index 7769904..c2f46a0 100755 (executable)
--- a/backend.c
+++ b/backend.c
@@ -3134,6 +3134,7 @@ read_from_ics(isr, closure, data, count, error)
                    strncmp(why, "Continuing ", 11) == 0) {
                    gs_gamenum = gamenum;
                    strcpy(gs_kind, strchr(why, ' ') + 1);
+                   VariantSwitch(boards[currentMove], StringToVariant(gs_kind)); // [HGM] variantswitch: even before we get first board
 #if ZIPPY
                    if (appData.zippyPlay) {
                        ZippyGameStart(whitename, blackname);