]> git.sesse.net Git - remoteglot/commitdiff
Fix PGN parsing; it was broken by a scoping change.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Nov 2014 10:35:11 +0000 (11:35 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 16 Nov 2014 10:35:11 +0000 (11:35 +0100)
remoteglot.pl

index 4e6edc68308f3524b252c765d61394126107f6cc..b128e29735b99e7a520d1d31ecec61db0d7cfe40 100755 (executable)
@@ -266,7 +266,8 @@ sub handle_pgn {
                my $moves = $pgn->moves;
                my @uci_moves = ();
                for my $move (@$moves) {
                my $moves = $pgn->moves;
                my @uci_moves = ();
                for my $move (@$moves) {
-                       my ($pos, $uci_move) = $pos->make_pretty_move($move);
+                       my $uci_move;
+                       ($pos, $uci_move) = $pos->make_pretty_move($move);
                        push @uci_moves, $uci_move;
                }
                $pos->{'history'} = \@uci_moves;
                        push @uci_moves, $uci_move;
                }
                $pos->{'history'} = \@uci_moves;
@@ -930,7 +931,8 @@ sub handle_tb_lookup_return {
                                my $moves = $pgn->moves;
                                my @uci_moves = ();
                                for my $move (@$moves) {
                                my $moves = $pgn->moves;
                                my @uci_moves = ();
                                for my $move (@$moves) {
-                                       my ($pvpos, $uci_move) = $pvpos->make_pretty_move($move);
+                                       my $uci_move;
+                                       ($pvpos, $uci_move) = $pvpos->make_pretty_move($move);
                                        push @uci_moves, $uci_move;
                                }
                                $tb_cache{$fen} = {
                                        push @uci_moves, $uci_move;
                                }
                                $tb_cache{$fen} = {