Explorar el Código

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

git-svn-id: trunk@38333 -
marco hace 7 años
padre
commit
1d5d5682d2
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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 }
     else { array or something like that }
         not_implemented;
         not_implemented;
     end;
     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;
 end;
 
 
 function VarToBCD ( const aValue : Variant ) : tBCD;
 function VarToBCD ( const aValue : Variant ) : tBCD;