From 8e83fcb1ccb5dbb93d469fd2d383c0488cfa64d5 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 20 Mar 2024 22:44:08 +0200 Subject: [PATCH] Fix returning from tutorial Removing these two values from the stack seems to prevent calling the leave_tutorial hook. --- src/nhlua.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nhlua.c b/src/nhlua.c index 79f240364..7d97a186a 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -174,8 +174,6 @@ l_nhcore_call(int callidx) lua_getfield(gl.luacore, -1, nhcore_call_names[callidx]); ltyp = lua_type(gl.luacore, -1); - lua_remove(gl.luacore, -2); /* nhcore_call_names[callidx] */ - lua_remove(gl.luacore, -2); /* nhcore */ if (ltyp == LUA_TFUNCTION) { nhl_pcall_handle(gl.luacore, 0, 1, "l_nhcore_call", NHLpa_panic); } else {