summaryrefslogtreecommitdiff
path: root/controller/unzbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'controller/unzbuffer.c')
-rw-r--r--controller/unzbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/controller/unzbuffer.c b/controller/unzbuffer.c
index ecd38a6..6578e61 100644
--- a/controller/unzbuffer.c
+++ b/controller/unzbuffer.c
@@ -56,7 +56,7 @@ bool unzbuffer_write(struct unzbuffer *z,u8 *data,i64 len){
return false;
}
if(ret!=Z_STREAM_END&&z->strm.avail_out>0)break;
- z->wf(z->out,BUFSZ_ZOUT,z->payload);
+ z->wf(z->out,BUFSZ_ZOUT-z->strm.avail_out,z->payload);
if(ret==Z_STREAM_END){
inflateReset(&z->strm);
z->strm.avail_in=0;