Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




ShadowFlare [Wed, 15 Aug 2012 07:38:26 +0000 (01:38 -0600)]
SFmpqapi.cpp

index db69b60..faf2701 100644 (file)
@@ -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;