X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=remoteglot.pl;h=675573def081eabb2c1c6ee204456abfaf067d42;hb=f662b895fc40db21c3d667b16e5a8f2d3f55dfd7;hp=313ccbe9026c1d807b641d39473de330132ac866;hpb=9d05aa8ac409900f99e8d0967bdba250d4ce55a2;p=remoteglot diff --git a/remoteglot.pl b/remoteglot.pl index 313ccbe..675573d 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 " 0.00"; + } if ($pos->{'toplay'} eq 'B') { $score = -$score; }