mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Trim cheats so 'vcmiartifacts ' will be recognized as single-word cheat
This commit is contained in:
parent
b0334b381e
commit
f14aec5876
@ -436,7 +436,7 @@ void PlayerMessageProcessor::cheatMaxMorale(PlayerColor player, const CGHeroInst
|
||||
bool PlayerMessageProcessor::handleCheatCode(const std::string & cheat, PlayerColor player, ObjectInstanceID currObj)
|
||||
{
|
||||
std::vector<std::string> words;
|
||||
boost::split(words, cheat, boost::is_any_of("\t\r\n "));
|
||||
boost::split(words, boost::trim_copy(cheat), boost::is_any_of("\t\r\n "));
|
||||
|
||||
if (words.empty() || !gameHandler->getStartInfo()->extraOptionsInfo.cheatsAllowed)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user