X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=4ccdac7e4b873d69143194795f2e6f71e0715806;hp=a924701b3ec4c19606d3e9477796bd7d677f7a5d;hb=6f6ae45314e4f9876ab4fa9b9ba50e0c6a5e8371;hpb=6c297793e9c8888e6a33bb2c72c852c876652d87 diff --git a/remoteglot.pl b/remoteglot.pl index a924701..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;