Update miniz_tdef.c

Co-authored-by: Alexander Borsuk <170263+biodranik@users.noreply.github.com>
This commit is contained in:
Martin Raiber 2022-05-06 21:30:08 +02:00 committed by GitHub
parent bc77ea1017
commit 144c351f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -521,7 +521,7 @@ static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d)
if (pOutput_buf >= d->m_pOutput_buf_end) if (pOutput_buf >= d->m_pOutput_buf_end)
return MZ_FALSE; return MZ_FALSE;
memcpy(pOutput_buf, &bit_buffer, 8); memcpy(pOutput_buf, &bit_buffer, sizeof(mz_uint64));
pOutput_buf += (bits_in >> 3); pOutput_buf += (bits_in >> 3);
bit_buffer >>= (bits_in & ~7); bit_buffer >>= (bits_in & ~7);
bits_in &= 7; bits_in &= 7;