mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 18:49:27 +02:00
* new bug
This commit is contained in:
parent
559e1e7d79
commit
8688ed7464
31
tests/webtbs/tw3676.pp
Normal file
31
tests/webtbs/tw3676.pp
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ %cpu=i386 }
|
||||||
|
{ %opt=-O2 }
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
uses classes;
|
||||||
|
|
||||||
|
function Read(Str: TStream): string;
|
||||||
|
begin
|
||||||
|
SetLength(Result, Str.Size - Str.Position);
|
||||||
|
writeln(str.size,' - ',str.Position);
|
||||||
|
Writeln(Length(Result));
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
stream: TMemoryStream;
|
||||||
|
buf: PChar;
|
||||||
|
x: char;
|
||||||
|
i: Integer;
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
stream := TMemoryStream.Create;
|
||||||
|
x := 'A';
|
||||||
|
buf := @x;
|
||||||
|
for i := 0 to 26000 do begin
|
||||||
|
stream.Write(buf, sizeof(buf^));
|
||||||
|
end;
|
||||||
|
stream.Position := 0;
|
||||||
|
s:=Read(stream);
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user