Remove extra whitespace at the end of stored Lua commands in the history

This commit is contained in:
Alexander Bock
2017-03-07 10:38:15 -05:00
parent 78ae311a1f
commit 5d57c3a577

View File

@@ -85,9 +85,9 @@ void LuaConsole::initialize() {
int64_t length;
file.read(reinterpret_cast<char*>(&length), sizeof(int64_t));
std::vector<char> tmp(length + 1);
std::vector<char> tmp(length);
file.read(tmp.data(), length);
tmp[length] = '\0';
//tmp[length] = '\0';
_commandsHistory.emplace_back(std::string(tmp.begin(), tmp.end()));
}