Skip to content
Snippets Groups Projects
Commit 13576c1f authored by DarkGod's avatar DarkGod
Browse files

Fixed a memory leak in the saving code

parent 43f59db2
No related branches found
No related tags found
No related merge requests found
......@@ -1864,7 +1864,7 @@ function _M:setupCommands()
print("===============")
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
self:changeLevel(1, "cults+test")
self:changeLevel(1, "cults+maggot")
do return end
local m = game.zone:makeEntity(game.level, "actor", {name="elven mage"}, nil, true)
local x, y = util.findFreeGrid(game.player.x, game.player.y, 20, true, {[Map.ACTOR]=true})
......
......@@ -297,6 +297,9 @@ static int serial_free(lua_State *L)
serial_type *s = (serial_type*)auxiliar_checkclass(L, "core{serial}", 1);
luaL_unref(L, LUA_REGISTRYINDEX, s->fname);
luaL_unref(L, LUA_REGISTRYINDEX, s->fadd);
luaL_unref(L, LUA_REGISTRYINDEX, s->a_ref);
luaL_unref(L, LUA_REGISTRYINDEX, s->d_ref);
luaL_unref(L, LUA_REGISTRYINDEX, s->d2_ref);
lua_pushnumber(L, 1);
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment