Ver Fonte

* Merging revisions 166 from trunk:
------------------------------------------------------------------------
r166 | michael | 2018-10-17 23:36:40 +0200 (Wed, 17 Oct 2018) | 1 line

* Fix stringofchar for count<=0
------------------------------------------------------------------------

michael há 6 anos atrás
pai
commit
373517e9df
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      packages/rtl/system.pas

+ 3 - 0
packages/rtl/system.pas

@@ -590,6 +590,9 @@ function StringOfChar(c: Char; l: NativeInt): String;
 var
   i: Integer;
 begin
+  asm
+    if ((l>0) && c.repeat) return c.repeat(l);
+  end;
   Result:='';
   for i:=1 to l do Result:=Result+c;
 end;