From ad566e0ccb947e1c2e3e81580edacaf88765701b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 14 Nov 2014 19:15:36 +0100 Subject: [PATCH] Fix a typo in mate sorting. --- remoteglot.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2