diff --git a/src/d_main.c b/src/d_main.c index f1fda7f21..4a430fd22 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1922,12 +1922,9 @@ void D_SRB2Main(void) { name = lumpinfo->name; - if (memcmp(name, "MAP", 3) == 0) // Ignore the headers + if (memcmp(name, "MAP", 3) == 0 && name[5] == '\0') // Ignore the headers { - INT16 num; - if (name[5] != '\0') - continue; - num = (INT16)M_MapNumber(name[3], name[4]); + INT16 num = (INT16)M_MapNumber(name[3], name[4]); // we want to record whether this map exists. if it doesn't have a header, we can assume it's not relephant if (num <= NUMMAPS && mapheaderinfo[num - 1]) @@ -1953,12 +1950,9 @@ void D_SRB2Main(void) { name = lumpinfo->name; - if (memcmp(name, "MAP", 3) == 0) // Ignore the headers + if (memcmp(name, "MAP", 3) == 0 && name[5] == '\0') // Ignore the headers { - INT16 num; - if (name[5] != '\0') - continue; - num = (INT16)M_MapNumber(name[3], name[4]); + INT16 num = (INT16)M_MapNumber(name[3], name[4]); // we want to record whether this map exists. if it doesn't have a header, we can assume it's not relephant if (num <= NUMMAPS && mapheaderinfo[num - 1])