Another castling fix.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 7 Jan 2018 00:43:20 +0000 (01:43 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 7 Jan 2018 00:43:20 +0000 (01:43 +0100)
Position.pm

index cd0cc97..93bde53 100644 (file)
@@ -84,7 +84,7 @@ sub from_fen {
                }
        }
        if ($castling =~ /k/) {
-               $pos->{'white_castle_k'} = _col_num_to_letter(_find_piece_col_from_right($board->[0], 'r'));
+               $pos->{'black_castle_k'} = _col_num_to_letter(_find_piece_col_from_right($board->[0], 'r'));
        }
        if ($castling =~ /q/) {
                $pos->{'black_castle_q'} = _col_num_to_letter(_find_piece_col($board->[0], 'r'));