diff options
author | Ladislav <Zezula> | 2013-11-18 12:35:21 +0100 |
---|---|---|
committer | Ladislav <Zezula> | 2013-11-18 12:35:21 +0100 |
commit | 870acd582701bc67c29b48319972303e5ceb706d (patch) | |
tree | 01f5150ff893c17251db52b1163c8a4c0cc596d2 /src/SFileCompactArchive.cpp | |
parent | 1f2305cc35734a8f3198be4ce6145de1710308b5 (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/SFileCompactArchive.cpp')
-rw-r--r-- | src/SFileCompactArchive.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SFileCompactArchive.cpp b/src/SFileCompactArchive.cpp index cc2df09..a726d43 100644 --- a/src/SFileCompactArchive.cpp +++ b/src/SFileCompactArchive.cpp @@ -625,12 +625,12 @@ bool WINAPI SFileSetMaxFileCount(HANDLE hMpq, DWORD dwMaxFileCount) if(ha->dwFlags & MPQ_FLAG_READ_ONLY) nError = ERROR_ACCESS_DENIED; - // The new limit must not be lower than the index of the last file entry in the table + // The new limit must be greater than the current file table size if(nError == ERROR_SUCCESS && ha->dwFileTableSize > dwMaxFileCount) nError = ERROR_DISK_FULL; // ALL file names must be known in order to be able - // to rebuild hash table size + // to rebuild hash table if(nError == ERROR_SUCCESS) { nError = CheckIfAllFilesKnown(ha, NULL, NULL); @@ -659,7 +659,7 @@ bool WINAPI SFileSetMaxFileCount(HANDLE hMpq, DWORD dwMaxFileCount) pOldHetTable = ha->pHetTable; // Create new one - ha->pHetTable = CreateHetTable(dwMaxFileCount, 0x40, true); + ha->pHetTable = CreateHetTable(0, dwMaxFileCount, 0x40, true); if(ha->pHetTable == NULL) nError = ERROR_NOT_ENOUGH_MEMORY; } |