From 961667784abefce64b3eb8ef3d46a054b807e57d Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Tue, 17 Oct 2006 13:47:54 +0000 Subject: [PATCH] * fixed tstrreal3, hopefully didn't break anything else git-svn-id: trunk@4949 - --- rtl/objpas/sysutils/sysstr.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rtl/objpas/sysutils/sysstr.inc b/rtl/objpas/sysutils/sysstr.inc index 57f685457f..384a503910 100644 --- a/rtl/objpas/sysutils/sysstr.inc +++ b/rtl/objpas/sysutils/sysstr.inc @@ -1015,7 +1015,7 @@ End; const {$ifdef FPC_HAS_TYPE_EXTENDED} - maxdigits = 15; + maxdigits = 18; {$else} maxdigits = 14; {$endif} @@ -1073,6 +1073,12 @@ Begin end else if (P<>0) then // we have a decimalseparator begin + if (Length(Result) > Precision + 1) and + (Precision + 1 > P) then + begin + P := Precision + 1; + SetLength(Result,P); + end; P := Length(Result); While (P>0) and (Result[P] = '0') Do Dec(P);