PieceToCharwas used instead of CharToPiece. In addition it is important
to deduce the color from currentMoe rather than forwardMostMove, as
one could be entering a move in the middle of a game (e.g. when editing
or starting a variation).
return;
}
if(sscanf(message, "choice %s", promoRestrict) == 1 && promoSweep != EmptySquare) {
- promoSweep = PieceToChar(forwardMostMove&1 ? ToLower(*promoRestrict) : ToUpper(*promoRestrict));
+ promoSweep = CharToPiece(currentMove&1 ? ToLower(*promoRestrict) : ToUpper(*promoRestrict));
Sweep(0);
return;
}