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