aboutsummaryrefslogtreecommitdiff
path: root/src/SFileCreateArchive.cpp
diff options
context:
space:
mode:
authorLadislav <Zezula>2013-10-11 21:40:00 +0200
committerLadislav <Zezula>2013-10-11 21:40:00 +0200
commitc59aa13d57bbd0adf6662ef3266a3943c7e5960f (patch)
treee4983e25b5b3f708e64b22608cc5d86abcc516ff /src/SFileCreateArchive.cpp
parent38655d66d94f958402ce65380f5373c7245c8e55 (diff)
+ (Perhaps) finally updated ZLIB so the fucking GIT will not downgrade it on next pull
+ Dmitry Vortex issues
Diffstat (limited to 'src/SFileCreateArchive.cpp')
-rw-r--r--src/SFileCreateArchive.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/SFileCreateArchive.cpp b/src/SFileCreateArchive.cpp
index 84109d3..3a6a0d8 100644
--- a/src/SFileCreateArchive.cpp
+++ b/src/SFileCreateArchive.cpp
@@ -86,6 +86,7 @@ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCrea
{
TFileStream * pStream = NULL; // File stream
TMPQArchive * ha = NULL; // MPQ archive handle
+ TMPQHeader * pHeader;
ULONGLONG MpqPos = 0; // Position of MPQ header in the file
HANDLE hMpq = NULL;
DWORD dwBlockTableSize = 0; // Initial block table size
@@ -175,7 +176,7 @@ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCrea
ha->dwSectorSize = pCreateInfo->dwSectorSize;
ha->UserDataPos = MpqPos;
ha->MpqPos = MpqPos;
- ha->pHeader = (TMPQHeader *)ha->HeaderData;
+ ha->pHeader = pHeader = (TMPQHeader *)ha->HeaderData;
ha->dwMaxFileCount = dwMaxFileCount;
ha->dwFileTableSize = 0;
ha->dwFileFlags1 = pCreateInfo->dwFileFlags1;
@@ -185,12 +186,6 @@ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCrea
// Setup the attributes
ha->dwAttrFlags = pCreateInfo->dwAttrFlags;
pStream = NULL;
- }
-
- // Fill the MPQ header
- if(nError == ERROR_SUCCESS)
- {
- TMPQHeader * pHeader = ha->pHeader;
// Fill the MPQ header
memset(pHeader, 0, sizeof(ha->HeaderData));