]> git.kaiwu.me - klib.git/commitdiff
fixed a bug in reading
authorHeng Li <lh3@live.co.uk>
Fri, 28 Oct 2011 19:16:40 +0000 (15:16 -0400)
committerHeng Li <lh3@live.co.uk>
Fri, 28 Oct 2011 19:16:40 +0000 (15:16 -0400)
bgzf.c

diff --git a/bgzf.c b/bgzf.c
index 79c3818f2a04a0f0ada7ab5ca3502cc866341c73..3bea7182d0384e9e4015ba7d1c69e78d16c33da6 100644 (file)
--- a/bgzf.c
+++ b/bgzf.c
@@ -352,7 +352,7 @@ int bgzf_read_block(BGZF *fp)
                return -1;
        }
        size += count;
-       if (inflate_block(fp, block_length) < 0) return -1;
+       if ((count = inflate_block(fp, block_length)) < 0) return -1;
        if (fp->block_length != 0) fp->block_offset = 0; // Do not reset offset if this read follows a seek.
        fp->block_address = block_address;
        fp->block_length = count;