overflow into the next gamemissions's map name array for MAP33-MAP35 (#1203)

This commit is contained in:
Fabian Greffrath 2023-09-14 09:16:35 +02:00 committed by GitHub
parent 97d125b782
commit 8279ba7d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -692,6 +692,14 @@ static void HU_widget_build_title (void)
(gamemission == pack_plut) ? HU_TITLEP :
HU_TITLE2;
}
// WADs like pl2.wad have a MAP33, and rely on the layout in the
// Vanilla executable, where it is possible to overflow the end of one
// array into the next.
else if (gamemode == commercial && gamemap >= 33 && gamemap <= 35)
{
s = (gamemission == doom2) ? (*mapnamesp[gamemap-33]) :
(gamemission == pack_plut) ? (*mapnamest[gamemap-33]) : "";
}
else
{
// initialize the map title widget with the generic map lump name