From b4c8de8695a53fc3348dffe93f40683cb6d63fa7 Mon Sep 17 00:00:00 2001
From: Blockhead <jbis1337@hotmail.com>
Date: Mon, 18 Jan 2021 15:27:50 +0100
Subject: 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)

---
 serialize_lib/serialize.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/serialize_lib/serialize.lua b/serialize_lib/serialize.lua
index a525e9e..12a26c4 100644
--- a/serialize_lib/serialize.lua
+++ b/serialize_lib/serialize.lua
@@ -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
-- 
cgit v1.2.3