]> git.sesse.net Git - remoteglot-book/commitdiff
Less bogosity when we have no position info.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Dec 2014 17:13:02 +0000 (18:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 13 Dec 2014 17:13:02 +0000 (18:13 +0100)
www/opening-stats.pl

index aea6b2d08aa984f2d4782e1817279e04acb5ec5a..076a6a3636ae0498b0af861c121de4ed5f3941de 100755 (executable)
@@ -26,6 +26,7 @@ my $opening = $openings{$opening_num} // 'A00: Start position';
 
 my $root_pgn;
 eval {
+       die "Missing PGN position data." if (!defined($pgn_file_number) || !defined($pgn_start_position));
        $root_pgn = read_root_pgn($pgn_file_number, $pgn_start_position);
 };
 if ($@) {