diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 4d7b3c7d2..5a39d7dbb 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -312,8 +312,13 @@ FString level_info_t::LookupLevelName() { mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(&MapName[5])); } + else + { + // make sure nothing is stripped. + checkstring[0] = '\0'; + } thename = strstr (lookedup, checkstring); - if (thename == NULL) + if (thename == NULL || thename == lookedup) { thename = lookedup; }