Daniël Mantione пишет:
Ok, read with me. If we seek backwards (which is the case with offset 0 from beginning), we call reset:

      if origin=sofrombeginning then
        dec(offset,raw_read);
      if offset<0 then
        begin
          inc(offset,raw_read);
          reset;
        end;

Inside reset, we set the source stream position to 0:
No, Daniel. When we just create TDecompressionStream we seeks to soFromBeginning, 0. We have raw_read = 0, so offset = 0 too after dec(offset, raw_read). And next condition with offset < 0 then is false => so no reset call.

I fixed that locally after your commit and lazarus works.

Best regards,
Paul Ishenin.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to