aboutsummaryrefslogtreecommitdiff
path: root/src/SFileListFile.cpp
diff options
context:
space:
mode:
authorLadislav Zezula <ladislav.zezula@avg.com>2013-12-06 15:20:47 +0100
committerLadislav Zezula <ladislav.zezula@avg.com>2013-12-06 15:20:47 +0100
commitf2a388780f83cfd95afa27b01dafe3a683b0e39c (patch)
tree34137a334e713c088a41ea2bdbdba0648df5f00b /src/SFileListFile.cpp
parentc34c37b3418f1e5ab3678ce65d46f81803dec91d (diff)
+ Bug fixes in SFileGetFileInfo, SAttrFileSaveToMpq, SListFileSaveToMpq
+ FileStream now handles files over 2GB properly + Test under Linux
Diffstat (limited to 'src/SFileListFile.cpp')
-rw-r--r--src/SFileListFile.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp
index f98c92b..896b341 100644
--- a/src/SFileListFile.cpp
+++ b/src/SFileListFile.cpp
@@ -382,19 +382,13 @@ int SListFileSaveToMpq(TMPQArchive * ha)
// At this point, we expect to have at least one reserved entry in the file table
assert(ha->dwReservedFiles >= 1);
+ ha->dwReservedFiles--;
// Create the raw data that is to be written to (listfile)
// Note: Creating the raw data before the (listfile) has been created in the MPQ
// causes that the name of the listfile will not be included in the listfile itself.
// That is OK, because (listfile) in Blizzard MPQs does not contain it either.
pbListFile = CreateListFile(ha, &cbListFile);
-
- // Now we decrement the number of reserved files.
- // This frees one slot in the file table, so the subsequent file create operation should succeed
- // This must happen even if the listfile cannot be created
- ha->dwReservedFiles--;
-
- // If the listfile create succeeded, we write it to the MPQ
if(pbListFile != NULL)
{
// We expect it to be nonzero size