Correct close calls.
This commit is contained in:
parent
ee590db95e
commit
0b1e15bf4d
1 changed files with 2 additions and 2 deletions
4
init.lua
4
init.lua
|
@ -38,7 +38,7 @@ local inp = io.open(fun_caves.world..'/fun_caves_data.txt','r')
|
|||
if inp then
|
||||
local d = inp:read('*a')
|
||||
fun_caves.db = minetest.deserialize(d)
|
||||
inp.close()
|
||||
inp:close()
|
||||
end
|
||||
if not fun_caves.db then
|
||||
fun_caves.db = {}
|
||||
|
@ -160,7 +160,7 @@ minetest.register_on_shutdown(function()
|
|||
if out then
|
||||
print('Fun Caves: Saving database at shutdown')
|
||||
out:write(minetest.serialize(fun_caves.db))
|
||||
out.close()
|
||||
out:close()
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue