From 8751e8bb3e548820da6df400d0b3905fe88f1b1c Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 5 Oct 2015 19:10:54 +0000 Subject: [PATCH] * Fix bug ID #26827 git-svn-id: trunk@31953 - --- packages/paszlib/src/infcodes.pas | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/paszlib/src/infcodes.pas b/packages/paszlib/src/infcodes.pas index b8006b8054..02ab81299a 100644 --- a/packages/paszlib/src/infcodes.pas +++ b/packages/paszlib/src/infcodes.pas @@ -150,6 +150,15 @@ begin z.next_in := p; s.write := q; 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; end; dec(n);