From a2d81b1c374f7d37394b9129179a34aeb3c074cc Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 12 Dec 2014 02:16:12 +0100 Subject: [PATCH] Fix a sort-of rare and silly castling bug. --- www/opening-stats.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/opening-stats.pl b/www/opening-stats.pl index b62a30b..f9e8548 100755 --- a/www/opening-stats.pl +++ b/www/opening-stats.pl @@ -19,7 +19,7 @@ my $fen = $cgi->param('fen') // 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w K my $pos = Position->from_fen($fen); my $hex = unpack('H*', $pos->bitpacked_fen); print $chld_in $hex, "\n"; -my $line = <$chld_out>; +chomp (my $line = <$chld_out>); my ($white, $draw, $black, $opening_num, $white_avg_elo, $black_avg_elo, $num_elo, $timestamp, @moves) = split / /, $line; my $opening = $openings{$opening_num} // 'A00: Start position'; -- 2.39.2