Fix a couple of warnings in the new versions of LZ4 and Miniz

git-svn-id: https://svn.eduke32.com/eduke32@6850 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-04-23 06:35:45 +00:00
parent 4cd19d5435
commit ee4df7fde5
2 changed files with 3 additions and 1 deletions

View file

@ -39,6 +39,8 @@ extern "C" {
#ifndef LZ4_H_2983827168210
#define LZ4_H_2983827168210
#define LZ4_VISIBILITY
/* --- Dependency --- */
#include <stddef.h> /* size_t */

View file

@ -1484,7 +1484,7 @@ void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int
for (y = 0; y < h; ++y)
{
tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH);
tdefl_compress_buffer(pComp, (mz_uint8 *)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH);
tdefl_compress_buffer(pComp, (mz_uint8 const *)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH);
}
if (tdefl_compress_buffer(pComp, NULL, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE)
{