Browse Source

--- Merging r31953 into '.':
U packages/paszlib/src/infcodes.pas
--- Recording mergeinfo for merge of r31953 into '.':
U .

# revisions: 31953

git-svn-id: branches/fixes_3_0@31966 -

joost 9 years ago
parent
commit
cb069711eb
1 changed files with 9 additions and 0 deletions
  1. 9 0
      packages/paszlib/src/infcodes.pas

+ 9 - 0
packages/paszlib/src/infcodes.pas

@@ -150,6 +150,15 @@ begin
           z.next_in := p;
           z.next_in := p;
           s.write := q;
           s.write := q;
           inflate_codes := inflate_flush(s,z,r);
           inflate_codes := inflate_flush(s,z,r);
+
+          //if this is the last block, there are no bytes left in stream and the block end code follows, finish processing this block
+          if s.last then
+          begin
+            t := c^.sub.code.tree;
+            if t^.exop and 32 <> 0 then
+              break;
+          end;
+
           exit;
           exit;
         end;
         end;
         dec(n);
         dec(n);