Fix multi-leg promotions
[xboard.git] / engineoutput.c
index ac1103e..6fd6662 100644 (file)
@@ -187,6 +187,8 @@ SetProgramStats (FrontEndProgramStats * stats) // now directly called by back-en
         return;
     }
 
+    if(appData.epd && which) return; // do not write second pane in -epd mode
+
     if( !EngineOutputDialogExists() ) {
         return;
     }
@@ -222,7 +224,7 @@ SetProgramStats (FrontEndProgramStats * stats) // now directly called by back-en
         clearMemo = TRUE;
     }
 
-    if( lastForwardMostMove[which] != forwardMostMove ) {
+    if( lastForwardMostMove[which] != forwardMostMove && endPV < 0) {
         clearMemo = TRUE;
     }
 
@@ -257,7 +259,7 @@ SetProgramStats (FrontEndProgramStats * stats) // now directly called by back-en
 
     /* Update */
     lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge
-    lastForwardMostMove[which] = forwardMostMove;
+    if(endPV < 0) lastForwardMostMove[which] = forwardMostMove; // not during PV walk!
 
     UpdateControls( &ed );
 }
@@ -697,13 +699,13 @@ OutputKibitz (int window, char *text)
        static int currentLineEnd[2];
        int where = 0;
        if(!EngineOutputIsUp()) return;
-       if(!opponentKibitzes) { // on first kibitz of game, clear memos
+       if(!opponentKibitzes && !appData.epd) { // on first kibitz of game, clear memos
            DoClearMemo(1); currentLineEnd[1] = 0;
            if(gameMode == IcsObserving) { DoClearMemo(0); currentLineEnd[0] = 0; }
        }
        opponentKibitzes = TRUE; // this causes split window DisplayMode in ICS modes.
        VerifyDisplayMode();
-       strncpy(text+strlen(text)-1, "\r\n",sizeof(text+strlen(text)-1)); // to not lose line breaks on copying
+       strncpy(text+strlen(text)-1, "\r\n", 4); // to not lose line breaks on copying
        if(gameMode == IcsObserving) {
            DoSetWindowText(0, nLabel, gameInfo.white);
            SetIcon( 0, nColorIcon,  nColorWhite);