From 93fde895b68fe24c7abb9237460b6cf352ac63d9 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 14 Dec 2014 11:39:18 +0100 Subject: [PATCH] Fix number-of-moves display in root PGN. --- 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 edbff24..3affdd5 100755 --- a/www/opening-stats.pl +++ b/www/opening-stats.pl @@ -53,7 +53,7 @@ eval { $root_game->{'date'} = $pgn->date; $root_game->{'result'} = $pgn->result; $root_game->{'eco'} = $pgn->eco; - $root_game->{'moves'} = scalar @{$pgn->moves}; + $root_game->{'moves'} = int(((scalar @{$pgn->moves}) + 1) / 2); }; # Explore one move out. -- 2.39.2