- Improve the code readability in LookupLevelName.

This commit is contained in:
Edoardo Prezioso 2015-05-02 14:18:52 +02:00
parent 4217c2ccd6
commit 353ace8be7
1 changed files with 2 additions and 1 deletions

View File

@ -314,10 +314,11 @@ FString level_info_t::LookupLevelName()
} }
else else
{ {
// make sure nothing is stripped.
checkstring[0] = '\0'; checkstring[0] = '\0';
} }
thename = strstr (lookedup, checkstring); thename = strstr (lookedup, checkstring);
if (thename == NULL) if (thename == NULL || thename == lookedup)
{ {
thename = lookedup; thename = lookedup;
} }