https://bugs.kde.org/show_bug.cgi?id=430403

--- Comment #4 from Dave Kaye <d...@linuxmail.org> ---
Created attachment 147653
  --> https://bugs.kde.org/attachment.cgi?id=147653&action=edit
Patch file Bug 430403

Attached is a patch to fix this bug.

The bug allows the castling rook to be captured by either a knight or bishop. 
If the rook has not moved, then the present code assumes the position is
occupied by a rook and will castle with the piece that is in that position. 
The present code will not allow castling if the capturing piece is a rook or a
queen, since these will immediately put the king into check and prevent
castling.

The patch is a simple check to see if the rook's position actually contains a
rook.  The color could also be checked, but this is not necessary.  If the
location is occupied by an opponent's rook (different color) it will not allow
castling due to that rook putting the king into check.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to