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 4e6edc6..b128e29 100755 (executable)
@@ -266,7 +266,8 @@ sub handle_pgn {
                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;
@@ -930,7 +931,8 @@ sub handle_tb_lookup_return {
                                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} = {