From 353ace8be77d45b11708e054fb0edeb25c9ee4f0 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Sat, 2 May 2015 14:18:52 +0200 Subject: [PATCH] - Improve the code readability in LookupLevelName. --- src/g_mapinfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index d26d2f45b..5a39d7dbb 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -314,10 +314,11 @@ FString level_info_t::LookupLevelName() } else { + // make sure nothing is stripped. checkstring[0] = '\0'; } thename = strstr (lookedup, checkstring); - if (thename == NULL) + if (thename == NULL || thename == lookedup) { thename = lookedup; }