From 27631209d90b8863db06b4c81c7b21efb32f2f2d Mon Sep 17 00:00:00 2001 From: Ladislav Date: Thu, 27 Mar 2014 17:21:38 +0100 Subject: + Fixed crash when adding file after an empty archive has been flushed --- src/SFileAddFile.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/SFileAddFile.cpp') diff --git a/src/SFileAddFile.cpp b/src/SFileAddFile.cpp index 040ed57..f941141 100644 --- a/src/SFileAddFile.cpp +++ b/src/SFileAddFile.cpp @@ -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); } } -- cgit v1.2.3