From 2ade3e0bd06264ae406cd95ba33415323cc47960 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Tue, 31 Jul 2018 13:50:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Cast=20buffer=20in=20inflate=20r?= =?UTF-8?q?outine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/inflate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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