+ Fixed crash when adding file after an empty archive has been flushed

This commit is contained in:
Ladislav
2014-03-27 17:21:38 +01:00
parent c8db90a9c4
commit 27631209d9
6 changed files with 271 additions and 158 deletions

View File

@@ -434,6 +434,11 @@ int SFileAddFile_Init(
// If the caller didn't set MPQ_FILE_REPLACEEXISTING, fail it
if((dwFlags & MPQ_FILE_REPLACEEXISTING) == 0)
nError = ERROR_ALREADY_EXISTS;
// When replacing an existing file,
// we still need to invalidate the (attributes) file
if(nError == ERROR_SUCCESS)
InvalidateInternalFiles(ha);
}
}