Răsfoiți Sursa

* Fixed BCDToStr for values between -1 and 0

git-svn-id: trunk@16952 -
joost 14 ani în urmă
părinte
comite
7b8797afe7
1 a modificat fișierele cu 4 adăugiri și 1 ștergeri
  1. 4 1
      rtl/objpas/fmtbcd.pp

+ 4 - 1
rtl/objpas/fmtbcd.pp

@@ -1728,7 +1728,10 @@ IMPLEMENTATION
             then begin
             then begin
 {$ifndef use_ansistring}
 {$ifndef use_ansistring}
               Inc ( l );
               Inc ( l );
-              result[1] := '0';
+              if Neg then
+                result[2] := '0'
+              else
+                result[1] := '0'
 {$else}
 {$else}
               result := result + '0';
               result := result + '0';
 {$endif}
 {$endif}