From: ShadowFlare Date: Wed, 15 Aug 2012 07:38:26 +0000 (-0600) Subject: Add these forgotten lines of code for restoring the pointer X-Git-Url: https://sfsrealm.hopto.org/projects/?a=commitdiff_plain;h=af6cb211f3c877df7f551115123b1e0bb5ed6206;p=SFmpqapi.git Add these forgotten lines of code for restoring the pointer --- diff --git a/SFmpqapi.cpp b/SFmpqapi.cpp index db69b60..faf2701 100644 --- a/SFmpqapi.cpp +++ b/SFmpqapi.cpp @@ -2187,6 +2187,7 @@ BOOL SFMPQAPI WINAPI MpqAddFileFromBufferEx(MPQHANDLE hMPQ, LPVOID lpBuffer, DWO if (i==TotalBlocks-1 && (ucfsz % blockSize)!=0) blockSize=ucfsz % blockSize; DWORD outLength=blockSize; BYTE *compdata = compbuffer; + char *oldoutbuffer = outbuffer; if (dwFlags & MAFA_COMPRESS) { memcpy(compdata,(char *)buffer+CurPos,blockSize); @@ -2233,6 +2234,7 @@ BOOL SFMPQAPI WINAPI MpqAddFileFromBufferEx(MPQHANDLE hMPQ, LPVOID lpBuffer, DWO memcpy((char *)newbuffer+LastOffset,outbuffer,outLength); LastOffset+=outLength; } + outbuffer = oldoutbuffer; CurPos += blockSize; } fsz = LastOffset;