From: Steinar H. Gunderson Date: Fri, 12 Dec 2014 01:16:12 +0000 (+0100) Subject: Fix a sort-of rare and silly castling bug. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a2d81b1c374f7d37394b9129179a34aeb3c074cc;p=remoteglot-book Fix a sort-of rare and silly castling bug. --- 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';