]> git.sesse.net Git - remoteglot/commitdiff
Finally fix the -0.00 bug.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Nov 2013 19:05:58 +0000 (20:05 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Nov 2013 19:05:58 +0000 (20:05 +0100)
remoteglot.pl

index e1da304a6732c49023471600ddf310af5e7663ac..675573def081eabb2c1c6ee204456abfaf067d42 100755 (executable)
@@ -1177,6 +1177,9 @@ sub long_score {
        } else {
                if (exists($info->{'score_cp' . $mpv})) {
                        my $score = $info->{'score_cp' . $mpv} * 0.01;
        } 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;
                        }
                        if ($pos->{'toplay'} eq 'B') {
                                $score = -$score;
                        }