mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-23 05:19:18 -06:00
Remove extra whitespace at the end of stored Lua commands in the history
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user