W_VerifyNMUSlumps: Rewind back to beginning of file handle for WAD

This commit is contained in:
toaster authored and Alug committed 2025-09-12 15:59:47 +02:00
1 parent ca5dd9e78f
commit 0e52845f50
1 file changed
+5
+5
View File
@@ -2310,7 +2310,9 @@ int W_VerifyNMUSlumps(const char *filename, FILE *handle, boolean exit_on_error)
int status = 0;
if (stricmp(&filename[strlen(filename) - 4], ".pk3") == 0)
{
status = W_VerifyPK3(handle, NMUSlist, false);
}
else
{
// detect wad file by the absence of the other supported extensions
@@ -2318,6 +2320,9 @@ int W_VerifyNMUSlumps(const char *filename, FILE *handle, boolean exit_on_error)
&& stricmp(&filename[strlen(filename) - 4], ".lua"))
{
status = W_VerifyWAD(handle, NMUSlist, false);
// repair file handle in this specific case
fseek(handle, 0, SEEK_SET);
}
}