mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 10:39:29 +02:00
In case of incorrect shutdown of the client. The buffer may return =0. There will be an exception.
This commit is contained in:
parent
6faa3872fc
commit
4e51973dba
@ -645,7 +645,7 @@ begin
|
||||
repeat
|
||||
SetLength(buf, aCount);
|
||||
Result := FSocket.ReadData(buf, aCount - aPos);
|
||||
if Result = -1 then
|
||||
if Result <= 0 then
|
||||
break;
|
||||
SetLength(buf, Result);
|
||||
Move(buf[0], aBytes[aPos], Result);
|
||||
|
Loading…
Reference in New Issue
Block a user