1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-03 17:19:46 +02:00

rwgame: do not copy cheat names

This commit is contained in:
Anonymous Maarten 2017-09-12 01:40:11 +02:00 committed by Daniel Evans
parent 5edead61d0
commit a9f009f97f

View File

@ -170,7 +170,7 @@ void RWGame::handleCheatInput(char symbol) {
cheatInputWindow = cheatInputWindow.substr(1) + symbol;
// Helper to check for cheats
auto checkForCheat = [this](std::string cheat,
auto checkForCheat = [this](const std::string& cheat,
std::function<void()> action) {
RW_CHECK(cheatInputWindow.length() >= cheat.length(), "Cheat too long");
size_t offset = cheatInputWindow.length() - cheat.length();