From 6749b54968f5971e71e07e8950c6671fb6818baf Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 9 Jul 2023 21:12:22 +0100 Subject: [PATCH] readlevelheader: Support lowercase for ZoneTitle Exposed by increased lowercase prevalence, fix before boarding that up. --- src/deh_soc.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/deh_soc.c b/src/deh_soc.c index bf6eb89a4..05ecbc60f 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -868,6 +868,7 @@ void readlevelheader(MYFILE *f, char * name) word2 = tmp + 2; i = atoi(word2); // used for numerical settings + // The following support mixed/lower case. if (fastcmp(word, "LEVELNAME")) { @@ -875,7 +876,14 @@ void readlevelheader(MYFILE *f, char * name) sizeof(mapheaderinfo[num]->lvlttl), va("Level header %d: levelname", num)); continue; } - // CHEAP HACK: move this over here for lowercase subtitles + + if (fastcmp(word, "ZONETITLE")) + { + deh_strlcpy(mapheaderinfo[num]->zonttl, word2, + sizeof(mapheaderinfo[num]->zonttl), va("Level header %d: zonetitle", num)); + continue; + } + if (fastcmp(word, "SUBTITLE")) { deh_strlcpy(mapheaderinfo[num]->subttl, word2, @@ -1000,11 +1008,6 @@ void readlevelheader(MYFILE *f, char * name) } // Strings that can be truncated - else if (fastcmp(word, "ZONETITLE")) - { - deh_strlcpy(mapheaderinfo[num]->zonttl, word2, - sizeof(mapheaderinfo[num]->zonttl), va("Level header %d: zonetitle", num)); - } else if (fastcmp(word, "SCRIPTNAME")) { deh_strlcpy(mapheaderinfo[num]->scriptname, word2,