🎨 Cast buffer in inflate routine

This commit is contained in:
C-3PO 2018-07-31 13:50:30 +02:00
parent 3923daf551
commit 2ade3e0bd0
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -41,11 +41,11 @@ struct InflateOutput inflateInflate(unsigned long numInputBytes, bool hasMoreByt
} else { } else {
//go back to beginning of input buffer //go back to beginning of input buffer
remainingInput = numInputBytes; remainingInput = numInputBytes;
comprBufferNext = comprBuffer; comprBufferNext = (const mz_uint8 *)comprBuffer;
} }
//output buffer has been emptied //output buffer has been emptied
spaceInOutput = uncomprBufferSize; spaceInOutput = uncomprBufferSize;
uncomprBufferNext = uncomprBuffer; uncomprBufferNext = (mz_uint8 *)uncomprBuffer;
struct InflateOutput out; struct InflateOutput out;
out.hasReachedEnd = false; out.hasReachedEnd = false;
@ -66,9 +66,9 @@ struct InflateOutput inflateInflate(unsigned long numInputBytes, bool hasMoreByt
); );
//Adjust buffer positions by the amount of bytes processed //Adjust buffer positions by the amount of bytes processed
comprBufferNext += in_bytes; comprBufferNext = (const mz_uint8 *)comprBufferNext + in_bytes;
remainingInput -= in_bytes; remainingInput -= in_bytes;
uncomprBufferNext += out_bytes; uncomprBufferNext = (mz_uint8 *)uncomprBufferNext + out_bytes;
spaceInOutput -= out_bytes; spaceInOutput -= out_bytes;
//Check for errors //Check for errors