From ecc378d8413d426248d1ea681e2666ec5c13d3e4 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 16 Jan 2011 21:44:26 +0100 Subject: [PATCH] Fix spurious mate test in Edit Game mode When entering a game, it was terminated by the mate test even when legality checking was switched off (so that mates might not be reliably recognized). The mate test is now made dependent on legality testing. --- backend.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index 26b7d80..938e27f 100644 --- a/backend.c +++ b/backend.c @@ -6243,6 +6243,7 @@ FinishMove(moveType, fromX, fromY, toX, toY, promoChar) switch (gameMode) { case EditGame: + if(appData.testLegality) switch (MateTest(boards[currentMove], PosFlags(currentMove)) ) { case MT_NONE: case MT_CHECK: -- 1.7.0.4