فهرست منبع

* Fix from Andrea Mauri to make formatfloat delphi-compatible in case of negative zero (bug ID 26465)

git-svn-id: trunk@33344 -
michael 9 سال پیش
والد
کامیت
f380aeb63d
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      rtl/objpas/sysutils/sysstr.inc

+ 11 - 0
rtl/objpas/sysutils/sysstr.inc

@@ -2197,6 +2197,17 @@ Var
         End;
       If (J<>0) then
         Digits[1]:='-';
+      If (Digits[1]='-') then
+        Begin
+        I:=1;
+        While (I<=length(Digits)) And (Not (Digits[I] in ['1'..'9'])) Do
+          Inc(I);
+        If (I>length(Digits)) then
+          Begin
+          Digits:=Copy(Digits, 2, Length(Digits));
+          Dec(DecimalPoint);
+          End;
+        End;  
       Exp := 0;
       End
     Else