瀏覽代碼

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

git-svn-id: trunk@11823 -
Jonas Maebe 17 年之前
父節點
當前提交
b2531e9883
共有 1 個文件被更改,包括 2 次插入1 次删除
  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