}
}
if(chattingPartner<0) // if not, look if there is a chatbox for this indivdual
- for(p=0; p<MAX_CHAT; p++) if(!strcasecmp(talker+1, chatPartner[p])) {
+ for(p=0; p<MAX_CHAT; p++) if(!StrCaseCmp(talker+1, chatPartner[p])) {
talker[0] = 0;
chattingPartner = p; break;
}
oldh = gameInfo.holdingsWidth,
oldv = gameInfo.variant;
- currentMove = forwardMostMove = backwardMostMove = 0;
if(appData.icsActive) shuffleOpenings = FALSE; // [HGM] shuffle: in ICS mode, only shuffle on ICS request
/* [AS] Initialize pv info list [HGM] and game status */
fprintf(debugFP, "Got premove: fromX %d,"
"fromY %d, toX %d, toY %d\n",
fromX, fromY, toX, toY);
+ if(!WhiteOnMove(currentMove) && gotPremove == 1) {
+ // [HGM] race: we must have been hit by an opponent move from the ICS while preparing the premove
+ if (appData.debugMode)
+ fprintf(debugFP, "Execute as normal move\n");
+ gotPremove = 0; break;
+ }
}
return ImpossibleMove;
}
fprintf(debugFP, "Got premove: fromX %d,"
"fromY %d, toX %d, toY %d\n",
fromX, fromY, toX, toY);
+ if(WhiteOnMove(currentMove) && gotPremove == 1) {
+ // [HGM] race: we must have been hit by an opponent move from the ICS while preparing the premove
+ if (appData.debugMode)
+ fprintf(debugFP, "Execute as normal move\n");
+ gotPremove = 0; break;
+ }
}
return ImpossibleMove;
}
gameMode = BeginningOfGame;
ModeHighlight();
if(appData.icsActive) gameInfo.variant = VariantNormal;
+ currentMove = forwardMostMove = backwardMostMove = 0;
InitPosition(redraw);
for (i = 0; i < MAX_MOVES; i++) {
if (commentList[i] != NULL) {