X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=4ccdac7e4b873d69143194795f2e6f71e0715806;hp=76163703bcf033921780c2496c550169511ef863;hb=ad566e0ccb947e1c2e3e81580edacaf88765701b;hpb=1eb8400865727a17fdfa2d6b30e86aa570862d6c diff --git a/remoteglot.pl b/remoteglot.pl index 7616370..4ccdac7 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -694,10 +694,10 @@ sub score_sort_key { my $score; if ($mate > 0) { # Side to move mates - $mate = 99999 - $mate; + $score = 99999 - $mate; } else { # Side to move is getting mated (note the double negative for $mate) - $mate = -99999 - $mate; + $score = -99999 - $mate; } if ($invert) { $score = -$score; @@ -861,7 +861,7 @@ sub handle_tb_lookup_return { # position in the meantime, we might query a completely # different position! But that's fine. } else { - die "Unknown response state state " . $response->{'Response'}{'StateString'}; + die "Unknown response state " . $state; } # Wait a second before we schedule another one.