mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-09 04:05:12 -04:00
deflate_decompress: rename overrun_count to overread_count
Make it clear that this is for the input, not the output. Update https://github.com/ebiggers/libdeflate/issues/157
This commit is contained in:
parent
572e4c5db0
commit
5be041247e
@ -43,7 +43,7 @@ FUNCNAME(struct libdeflate_decompressor * restrict d,
|
||||
const u8 * const in_end = in_next + in_nbytes;
|
||||
bitbuf_t bitbuf = 0;
|
||||
unsigned bitsleft = 0;
|
||||
size_t overrun_count = 0;
|
||||
size_t overread_count = 0;
|
||||
unsigned i;
|
||||
unsigned is_final_block;
|
||||
unsigned block_type;
|
||||
|
@ -222,7 +222,7 @@ do { \
|
||||
if (likely(in_next != in_end)) \
|
||||
bitbuf |= (bitbuf_t)*in_next++ << bitsleft; \
|
||||
else \
|
||||
overrun_count++; \
|
||||
overread_count++; \
|
||||
bitsleft += 8; \
|
||||
} while (bitsleft <= BITBUF_NBITS - 8)
|
||||
|
||||
@ -307,9 +307,9 @@ if (!HAVE_BITS(n)) { \
|
||||
*/
|
||||
#define ALIGN_INPUT() \
|
||||
do { \
|
||||
SAFETY_CHECK(overrun_count <= (bitsleft >> 3)); \
|
||||
in_next -= (bitsleft >> 3) - overrun_count; \
|
||||
overrun_count = 0; \
|
||||
SAFETY_CHECK(overread_count <= (bitsleft >> 3)); \
|
||||
in_next -= (bitsleft >> 3) - overread_count; \
|
||||
overread_count = 0; \
|
||||
bitbuf = 0; \
|
||||
bitsleft = 0; \
|
||||
} while(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user