diff --git a/source/lua_save_parser.cpp b/source/lua_save_parser.cpp index 2d89c612..2cbf7cbb 100644 --- a/source/lua_save_parser.cpp +++ b/source/lua_save_parser.cpp @@ -123,6 +123,11 @@ void LuaSaveParser::getModifiedSaveFile(std::vector &buffer, size_t *outSize (*outSize)++; } + if(buffer.back() == 0x00) { + buffer.pop_back(); + (*outSize)--; + } + lua_pop(m_luaState, 1); }