AD: Fix crash when fanmade game has only one word

This commit is contained in:
Eugene Sandulenko 2020-10-22 11:58:11 +02:00
parent df3c64a9ef
commit cc2db8211a

View File

@ -91,10 +91,13 @@ static Common::String sanitizeName(const char *name, int maxLen) {
maxLen -= word.size();
}
word.clear();
if (!*name)
break;
}
if (*name)
name++;
} while (*name && maxLen > 0);
} while (maxLen > 0);
return res;
}