X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=2c4bb9e8247be699bbd11cc21a5fd326a6389232;hp=a58168bb3347d663fb5d0c867aa0bcc4bd6090f5;hb=07fe77d2f39c91fee4545236ef1134f9000b749c;hpb=bb910c4ab5e73e747e94d813b934dd2d87dad4db diff --git a/remoteglot.pl b/remoteglot.pl index a58168b..2c4bb9e 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -107,6 +107,7 @@ while (1) { uciprint("position fen $fen"); uciprint("go infinite"); + %uciinfo = (); $last_move = time; # @@ -478,6 +479,7 @@ sub output_screen { } }; if ($@) { + %uciinfo = (); return; } @@ -510,7 +512,7 @@ sub output_screen { while (exists($uciinfo{'pv' . $mpv})) { $text .= sprintf " PV%2u", $mpv; my $score = short_score(\%uciinfo, \%ficsinfo, $mpv); - $text .= " ($score)" if (!defined($score)); + $text .= " ($score)" if (defined($score)); if (exists($uciinfo{'nodes' . $mpv}) && exists($uciinfo{'nps' . $mpv}) && exists($uciinfo{'depth' . $mpv})) { $text .= sprintf " (%5u kn, %3u kn/s, %2u ply)",