From 1d5d5682d22ac39cf6e200519c064b0c369e6e59 Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 24 Feb 2018 20:55:14 +0000 Subject: [PATCH] * mantis #30853, set precision and signspecialplaces in delphi compat way. git-svn-id: trunk@38333 - --- packages/rtl-objpas/src/inc/fmtbcd.pp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/rtl-objpas/src/inc/fmtbcd.pp b/packages/rtl-objpas/src/inc/fmtbcd.pp index 9066d09449..eb6ec653cf 100644 --- a/packages/rtl-objpas/src/inc/fmtbcd.pp +++ b/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;