diff options
Diffstat (limited to 'src/SFileListFile.cpp')
-rw-r--r-- | src/SFileListFile.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp index ed549d1..3428bcc 100644 --- a/src/SFileListFile.cpp +++ b/src/SFileListFile.cpp @@ -452,12 +452,12 @@ static int SFileAddExternalListFile( int nError = ERROR_SUCCESS; // Open the external list file - if(SFileOpenFileEx(hMpq, szListFile, SFILE_OPEN_LOCAL_FILE, &hListFile)) - { - // Add the data from the listfile to MPQ - nError = SFileAddArbitraryListFile(ha, hListFile); - SFileCloseFile(hListFile); - } + if(!SFileOpenFileEx(hMpq, szListFile, SFILE_OPEN_LOCAL_FILE, &hListFile)) + return GetLastError(); + + // Add the data from the listfile to MPQ + nError = SFileAddArbitraryListFile(ha, hListFile); + SFileCloseFile(hListFile); return nError; } @@ -524,9 +524,9 @@ int WINAPI SFileAddListFile(HANDLE hMpq, const char * szListFile) while(ha != NULL) { if(szListFile != NULL) - SFileAddExternalListFile(ha, hMpq, szListFile); + nError = SFileAddExternalListFile(ha, hMpq, szListFile); else - SFileAddInternalListFile(ha, hMpq); + nError = SFileAddInternalListFile(ha, hMpq); // Also, add three special files to the listfile: // (listfile) itself, (attributes) and (signature) |