Subject: | missing handling for 'very' long SAN, problem with debug mode |
bug 1: epdlist() dies with 'Not yet handled' if the pgn contains a
(valid) SAN like Qh4f2 (any platform, see attached file for an example).
Proposed solution: In sub movetype add the missing case
elsif ( $move =~ /^([RNBQK])([a-h][1-8])([a-h][1-8])(?:\+|\#)?$/ ) {
@result = ( $1, $3, $2 );
}
bug 2: in sub epdlist debug mode is determined by
my $debug = ( $moves[-1] eq '1' );
This throws a warning 'Use of uninitialized value in string eq ...' if
the parsed pgn does not contain any moves (eg white or black resigns
before the first move which might be considered an odd case but does
occur in big databases). Proposed solution:
Replace with
my $debug = @_ ? ( $moves[-1] eq '1' ) : 0;
Hope that helps. Thank you for your great work!
Cheers,
Ludens
Subject: | problem.pgn |
Message body not shown because it is not plain text.