Fix serialisation: breach of contract, file left open

Previous commit did not fix saving, but is kept because there is a corner case for which it is required (see MT forum)
This commit is contained in:
Blockhead 2021-01-18 15:27:50 +01:00 committed by orwell96
parent 7fa1a402bf
commit b4c8de8695
1 changed files with 1 additions and 0 deletions

View File

@ -190,6 +190,7 @@ local function write_to_fd(root_table, file, config)
file:write("LUA_SER v=1\n")
write_table(root_table, file, config)
file:write("E\nEND_SER\n")
file:close()
end
-- Reads the file contents from the passed file descriptor and returns the table on success