From: H.G. Muller Date: Sun, 10 Oct 2010 19:03:29 +0000 (+0200) Subject: Limit multi-session clock handling to non-ICS games X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c2bda090d29b9dd0af53185424281e6c10f05d10;p=xboard.git 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. --- 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;