X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=remoteglot.pl;h=0522e52888fca392a6f0936d337d76719c79e417;hp=313ccbe9026c1d807b641d39473de330132ac866;hb=423130017a261075410766c4723e0efc25415bb5;hpb=9d05aa8ac409900f99e8d0967bdba250d4ce55a2 diff --git a/remoteglot.pl b/remoteglot.pl index 313ccbe..0522e52 100755 --- a/remoteglot.pl +++ b/remoteglot.pl @@ -1144,9 +1144,9 @@ sub score_sort_key { if (defined($info->{'score_mate' . $mpv})) { if ($invert) { - return -(99999 - $info->{'score_mate' . $mpv}); - } else { return 99999 - $info->{'score_mate' . $mpv}; + } else { + return -(99999 - $info->{'score_mate' . $mpv}); } } else { if (exists($info->{'score_cp' . $mpv})) { @@ -1177,6 +1177,9 @@ sub long_score { } else { if (exists($info->{'score_cp' . $mpv})) { my $score = $info->{'score_cp' . $mpv} * 0.01; + if ($score == 0) { + return "Score: 0.00"; + } if ($pos->{'toplay'} eq 'B') { $score = -$score; }