|
@@ -192,7 +192,7 @@ end;
|
|
repeat
|
|
repeat
|
|
r:=Read(PByte(@Buffer)[t],Count);
|
|
r:=Read(PByte(@Buffer)[t],Count);
|
|
inc(t,r);
|
|
inc(t,r);
|
|
- until (t=Count) or (r=0);
|
|
|
|
|
|
+ until (t=Count) or (r<=0);
|
|
if (t<Count) then
|
|
if (t<Count) then
|
|
Raise EReadError.Create(SReadError);
|
|
Raise EReadError.Create(SReadError);
|
|
end;
|
|
end;
|
|
@@ -207,7 +207,7 @@ end;
|
|
Repeat
|
|
Repeat
|
|
r:=Write(PByte(@Buffer)[t],Count);
|
|
r:=Write(PByte(@Buffer)[t],Count);
|
|
inc(t,r);
|
|
inc(t,r);
|
|
- Until (t=count) or (r=0);
|
|
|
|
|
|
+ Until (t=count) or (r<=0);
|
|
if (t<Count) then
|
|
if (t<Count) then
|
|
Raise EWriteError.Create(SWriteError);
|
|
Raise EWriteError.Create(SWriteError);
|
|
end;
|
|
end;
|
|
@@ -833,8 +833,11 @@ begin
|
|
Result:=Length(FDataString)-FPosition;
|
|
Result:=Length(FDataString)-FPosition;
|
|
If Result>Count then Result:=Count;
|
|
If Result>Count then Result:=Count;
|
|
// This supposes FDataString to be of type AnsiString !
|
|
// This supposes FDataString to be of type AnsiString !
|
|
- Move (Pchar(FDataString)[FPosition],Buffer,Result);
|
|
|
|
- FPosition:=FPosition+Result;
|
|
|
|
|
|
+ if Result>0 then
|
|
|
|
+ begin
|
|
|
|
+ Move (Pchar(FDataString)[FPosition],Buffer,Result);
|
|
|
|
+ FPosition:=FPosition+Result;
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|