The patch to allow entering of friendly capture (intended as a kludge
for entering non-standard castling) had broken the ability to change
the selected piece by clicking another piece, as this was now always
interpreted as a friendly capture (which was then rejected as illegal).
By testing marker[][] in stead of legal[][] this can be avoided; legal[][]
was not a good measure, because in absence of a highlight command it
is completely filled with 1, to make everything legal. No friendly squares
will ever get marked unless a highlight command does it, though.
toP = boards[currentMove][y][x];
frc = appData.fischerCastling || gameInfo.variant == VariantSChess;
if( (killX < 0 || x != fromX || y != fromY) && // [HGM] lion: do not interpret igui as deselect!
- legal[y][x] == 0 && // if engine told we can move to here, do it even if own piece
+ marker[y][x] == 0 && // if engine told we can move to here, do it even if own piece
((WhitePawn <= fromP && fromP <= WhiteKing &&
WhitePawn <= toP && toP <= WhiteKing &&
!(fromP == WhiteKing && toP == WhiteRook && frc) &&