aboutsummaryrefslogtreecommitdiff
path: root/src/SFileCreateArchive.cpp
diff options
context:
space:
mode:
authorLadislav <Zezula>2013-11-18 12:35:21 +0100
committerLadislav <Zezula>2013-11-18 12:35:21 +0100
commit870acd582701bc67c29b48319972303e5ceb706d (patch)
tree01f5150ff893c17251db52b1163c8a4c0cc596d2 /src/SFileCreateArchive.cpp
parent1f2305cc35734a8f3198be4ce6145de1710308b5 (diff)
+ Adding files to MPQ no longer removes (listfile) and (attributes) when not enough space in the hash tablev8.99
+ Fixes in deletion of files from MPQs v 4.0
Diffstat (limited to 'src/SFileCreateArchive.cpp')
-rw-r--r--src/SFileCreateArchive.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SFileCreateArchive.cpp b/src/SFileCreateArchive.cpp
index 39332a6..78ddd71 100644
--- a/src/SFileCreateArchive.cpp
+++ b/src/SFileCreateArchive.cpp
@@ -211,13 +211,13 @@ bool WINAPI SFileCreateArchive2(const TCHAR * szMpqName, PSFILE_CREATE_MPQ pCrea
nError = WriteNakedMPQHeader(ha);
// Remember that the (listfile) and (attributes) need to be saved
- ha->dwFlags |= MPQ_FLAG_CHANGED | MPQ_FLAG_INV_LISTFILE | MPQ_FLAG_INV_ATTRIBUTES;
+ ha->dwFlags |= MPQ_FLAG_CHANGED | MPQ_FLAG_LISTFILE_INVALID | MPQ_FLAG_ATTRIBUTES_INVALID;
}
// Create initial HET table, if the caller required an MPQ format 3.0 or newer
if(nError == ERROR_SUCCESS && pCreateInfo->dwMpqVersion >= MPQ_FORMAT_VERSION_3)
{
- ha->pHetTable = CreateHetTable(ha->dwMaxFileCount, 0x40, true);
+ ha->pHetTable = CreateHetTable(0, ha->dwFileTableSize, 0x40, true);
if(ha->pHetTable == NULL)
nError = ERROR_NOT_ENOUGH_MEMORY;
}