@@ -452,12 +452,12 @@ static int SFileAddExternalListFile(
452
452
int nError = ERROR_SUCCESS;
453
453
454
454
// Open the external list file
455
- if (SFileOpenFileEx (hMpq, szListFile, SFILE_OPEN_LOCAL_FILE, &hListFile))
456
- {
457
- // Add the data from the listfile to MPQ
458
- nError = SFileAddArbitraryListFile (ha, hListFile);
459
- SFileCloseFile ( hListFile);
460
- }
455
+ if (! SFileOpenFileEx (hMpq, szListFile, SFILE_OPEN_LOCAL_FILE, &hListFile))
456
+ return GetLastError ();
457
+
458
+ // Add the data from the listfile to MPQ
459
+ nError = SFileAddArbitraryListFile (ha, hListFile);
460
+ SFileCloseFile (hListFile);
461
461
return nError;
462
462
}
463
463
@@ -524,9 +524,9 @@ int WINAPI SFileAddListFile(HANDLE hMpq, const char * szListFile)
524
524
while (ha != NULL )
525
525
{
526
526
if (szListFile != NULL )
527
- SFileAddExternalListFile (ha, hMpq, szListFile);
527
+ nError = SFileAddExternalListFile (ha, hMpq, szListFile);
528
528
else
529
- SFileAddInternalListFile (ha, hMpq);
529
+ nError = SFileAddInternalListFile (ha, hMpq);
530
530
531
531
// Also, add three special files to the listfile:
532
532
// (listfile) itself, (attributes) and (signature)
0 commit comments