Fixes bug 0016003 using patch from Lagunov Aleksey. Zero length read stream reads ALL the stream instead nothing.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1181 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
Joshy
2010-03-15 19:05:59 +00:00
parent 5bccf8036a
commit fa1a92f38d

View File

@ -1390,7 +1390,10 @@ begin
Dec(PendingRecordSize,2); Dec(PendingRecordSize,2);
LString:=''; LString:='';
while PendingRecordSize>0 do begin while PendingRecordSize>0 do begin
if StringLength>0 then begin
//Read a stream of zero length reads all the stream.
LString:=LString+ReadString(AStream,StringLength); LString:=LString+ReadString(AStream,StringLength);
end;
if (PendingRecordSize=0) and (Items>1) then begin if (PendingRecordSize=0) and (Items>1) then begin
//A continue will happend, read the continue //A continue will happend, read the continue
//tag and continue linking... //tag and continue linking...