diff --git a/src/w_wad.cpp b/src/w_wad.cpp index e69d4b36d..3c68b1378 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -2535,12 +2535,12 @@ 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); } } + // repair file handle so we don't have to open a new one + fseek(handle, 0, SEEK_SET); + if (status == -1) W_InitFileError(filename, exit_on_error);