diff --git a/src/w_wad.c b/src/w_wad.c index e8910e098..0bb741a59 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -1094,10 +1094,10 @@ UINT16 W_CheckNumForFolderStartPK3(const char *name, UINT16 wad, UINT16 startlum /* SLADE is special and puts a single directory entry. Skip that. */ if (strlen(lump_p->fullname) == name_length) i++; - break; + return i; } } - return i; + return INT16_MAX; } // In a PK3 type of resource file, it looks for the next lumpinfo entry that doesn't share the specified pathfile.