Explorar o código

* don't "round" 0.0 when converting to a string (mantis #12202)

git-svn-id: trunk@11823 -
Jonas Maebe %!s(int64=17) %!d(string=hai) anos
pai
achega
b2531e9883
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      rtl/inc/real2str.inc

+ 2 - 1
rtl/inc/real2str.inc

@@ -367,7 +367,8 @@ begin
           for fracCount := 1 to currPrec do
             factor := factor * 10.0;
           corrval := corrval / factor;
-          d:=d+roundCorr;
+          if (d<>0.0) then
+            d:=d+roundCorr;
           if d >= corrVal then
             d := d + corrVal;
           if int(d) = 1 then