Make autocompletion of LuaConsole not crash

This commit is contained in:
Alexander Bock
2016-02-05 18:19:06 +01:00
parent 877a4d1ba6
commit 32cd2d69b9
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -38,6 +38,7 @@
#include <string>
#include <iostream>
#include <iterator>
#include <fstream>
#include <sgct.h>
@@ -221,7 +222,7 @@ void LuaConsole::keyboardCallback(Key key, KeyModifier modifier, KeyAction actio
std::string commandLowerCase;
std::transform(
command.begin(), command.end(),
commandLowerCase.begin(),
std::back_inserter(commandLowerCase),
::tolower
);
@@ -229,7 +230,7 @@ void LuaConsole::keyboardCallback(Key key, KeyModifier modifier, KeyAction actio
std::transform(
_autoCompleteInfo.initialValue.begin(),
_autoCompleteInfo.initialValue.end(),
initialValueLowerCase.begin(),
std::back_inserter(initialValueLowerCase),
::tolower
);