From 2a5eba569d18705315ec474b3dc5f1450bee6f45 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 10 Jul 2008 09:48:23 +0200 Subject: [PATCH] lua: pop error Signed-off-by: Julien Danjou --- lua.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua.h b/lua.h index 7052f584..0e54ef32 100644 --- a/lua.h +++ b/lua.h @@ -85,8 +85,11 @@ typedef int luaA_function; if(n) \ lua_insert(L, - (n + 1)); \ if(lua_pcall(L, n, r, 0)) \ + { \ warn("error running function: %s", \ lua_tostring(L, -1)); \ + lua_pop(L, 1); \ + } \ } \ } while(0)