Skip to content

Commit

Permalink
Hotfix for an extra zero byte being added when using binary files whi…
Browse files Browse the repository at this point in the history
…ch breaks some save files
  • Loading branch information
WerWolv committed Jul 26, 2018
1 parent 31cc0a4 commit 6ab40b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/lua_save_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ void LuaSaveParser::getModifiedSaveFile(std::vector<u8> &buffer, size_t *outSize
(*outSize)++;
}

if(buffer.back() == 0x00) {
buffer.pop_back();
(*outSize)--;
}

lua_pop(m_luaState, 1);
}

Expand Down

0 comments on commit 6ab40b5

Please sign in to comment.