]> git.sesse.net Git - remoteglot/commitdiff
Fix a typo in mate sorting.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 14 Nov 2014 18:15:36 +0000 (19:15 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 14 Nov 2014 18:15:36 +0000 (19:15 +0100)
remoteglot.pl

index a924701b3ec4c19606d3e9477796bd7d677f7a5d..4ccdac7e4b873d69143194795f2e6f71e0715806 100755 (executable)
@@ -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;