- fixed: lump filters without any dot in the name did not work.

This commit is contained in:
Christoph Oelckers 2019-11-03 15:54:18 +01:00
parent b179767d4a
commit 12a02cb456
2 changed files with 9 additions and 2 deletions

View file

@ -303,7 +303,11 @@ void FResourceFile::PostProcessArchive(void *lumps, size_t lumpsize)
int lastpos = -1;
FString file;
while ((len = LumpFilter.IndexOf('.', lastpos+1)) > 0)
if (LumpFilter.IndexOf('.') < 0)
{
max -= FilterLumps(LumpFilter, lumps, lumpsize, max);
}
else while ((len = LumpFilter.IndexOf('.', lastpos+1)) > 0)
{
max -= FilterLumps(LumpFilter.Left(len), lumps, lumpsize, max);
lastpos = len;

View file

@ -915,8 +915,11 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm))
int32_t registerosdcommands(void)
{
if (!VOLUMEONE)
if (VOLUMEONE)
OSD_RegisterFunction("changelevel","changelevel <level>: warps to the given level", osdcmd_changelevel);
else
{
OSD_RegisterFunction("changelevel","changelevel <volume> <level>: warps to the given level", osdcmd_changelevel);
OSD_RegisterFunction("map","map <mapfile>: loads the given user map", osdcmd_map);
OSD_RegisterFunction("demo","demo <demofile or demonum>: starts the given demo", osdcmd_demo);
}