mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-12 01:59:30 +01:00
fixed setting memstream capacity to 0
git-svn-id: trunk@590 -
This commit is contained in:
parent
f6ca017761
commit
a879211175
@ -600,7 +600,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Result:=Reallocmem(FMemory,Newcapacity);
|
Result:=Reallocmem(FMemory,Newcapacity);
|
||||||
If Result=Nil then
|
If (Result=Nil) and (Newcapacity>0) then
|
||||||
Raise EStreamError.Create(SMemoryStreamError);
|
Raise EStreamError.Create(SMemoryStreamError);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user