2
0
Michaël Van Canneyt 1 жил өмнө
parent
commit
193f20b697

+ 2 - 3
rtl/objpas/sysutils/sysformt.inc

@@ -368,9 +368,8 @@ begin
                     hs:=Args[doarg].VVariant^;
                 Index:=Length(hs);
                 If (Prec<>-1) and (Index>Prec) then
-                  ToAdd:=Copy(hs,1,Prec)
-                else
-                  ToAdd:=hs;
+                  SetLength(hs,Prec);
+                ToAdd:=hs;
               end;
         'P' : Begin
               CheckArg(vtpointer,true);