From c2bda090d29b9dd0af53185424281e6c10f05d10 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 10 Oct 2010 21:03:29 +0200 Subject: [PATCH] Limit multi-session clock handling to non-ICS games In ICS games a time forfeit crashed XBoard, apparently because the fullTimeControl string is not properly set when we try to use it to see if a sudden-death session is indeed the last session. --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 6547358..257a806 100644 --- a/backend.c +++ b/backend.c @@ -14313,7 +14313,7 @@ DecrementClocks() if (WhiteOnMove(forwardMostMove)) { if(whiteNPS >= 0) lastTickLength = 0; timeRemaining = whiteTimeRemaining -= lastTickLength; - if(timeRemaining < 0) { + if(timeRemaining < 0 && !appData.icsActive) { GetTimeQuota((forwardMostMove-whiteStartMove-1)/2, 0, whiteTC); // sets suddenDeath & nextSession; if(suddenDeath) { // [HGM] if we run out of a non-last incremental session, go to the next whiteStartMove = forwardMostMove; whiteTC = nextSession; @@ -14325,7 +14325,7 @@ DecrementClocks() } else { if(blackNPS >= 0) lastTickLength = 0; timeRemaining = blackTimeRemaining -= lastTickLength; - if(timeRemaining < 0) { // [HGM] if we run out of a non-last incremental session, go to the next + if(timeRemaining < 0 && !appData.icsActive) { // [HGM] if we run out of a non-last incremental session, go to the next GetTimeQuota((forwardMostMove-blackStartMove-1)/2, 0, blackTC); if(suddenDeath) { blackStartMove = forwardMostMove; -- 1.7.0.4