Browse Source

* mantis #30853, set precision and signspecialplaces in delphi compat way.

git-svn-id: trunk@38333 -
marco 7 years ago
parent
commit
1d5d5682d2
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/rtl-objpas/src/inc/fmtbcd.pp

+ 6 - 0
packages/rtl-objpas/src/inc/fmtbcd.pp

@@ -4130,6 +4130,12 @@ begin
     else { array or something like that }
         not_implemented;
     end;
+  // peephole, avoids problems with databases, mantis #30853
+  if (Result.Precision = 0) and (Result.SignSpecialPlaces = 0) then 
+    begin
+      Result.Precision := 10;
+      Result.SignSpecialPlaces := 2;
+    end;
 end;
 
 function VarToBCD ( const aValue : Variant ) : tBCD;