- Fixed P_CheckMapData allowed non-map lump names to pass resulting in a crash when actually trying to load the map.
This commit is contained in:
parent
3480d40484
commit
bb494292c6
3 changed files with 50 additions and 16 deletions
|
|
@ -329,7 +329,15 @@ MapData *P_OpenMapData(const char * mapname)
|
|||
// Since levels must be stored in WADs they can't really have full
|
||||
// names and for any valid level lump this always returns the short name.
|
||||
const char * lumpname = Wads.GetLumpFullName(lump_name + i);
|
||||
index = GetMapIndex(mapname, index, lumpname, i != 1 || Wads.LumpLength(lump_name + i) == 0);
|
||||
try
|
||||
{
|
||||
index = GetMapIndex(mapname, index, lumpname, true);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
delete map;
|
||||
throw;
|
||||
}
|
||||
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
||||
|
||||
// The next lump is not part of this map anymore
|
||||
|
|
@ -461,7 +469,15 @@ MapData *P_OpenMapData(const char * mapname)
|
|||
|
||||
if (i>0)
|
||||
{
|
||||
index = GetMapIndex(maplabel, index, lumpname, true);
|
||||
try
|
||||
{
|
||||
index = GetMapIndex(maplabel, index, lumpname, true);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
delete map;
|
||||
throw;
|
||||
}
|
||||
if (index == ML_BEHAVIOR) map->HasBehavior = true;
|
||||
|
||||
// The next lump is not part of this map anymore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue