Skip to content

[2.2.12] Using -warp on a level without a map header crashes the game

See title.

According to the crash log I get, the problem resides in the function M_CampaignWarpIsCheat in the file m_cond.c at this line:

if (mapheaderinfo[mapnum-1]->menuflags & LF2_HIDEINMENU)

Looking at the function, it seems like there's no check for whether the level has a map header at all, which is likely causing the crash. I would make a merge request for this, but I'm not sure whether this case should be counted as a cheat or not.

Edited by MIDIMan