From 0540f4f67dc76a5d4d3f6688cab9af69d6ed5ad1 Mon Sep 17 00:00:00 2001 From: Simon Schmidt Date: Fri, 17 Mar 2017 17:58:26 +0100 Subject: [PATCH] Fix Bug --- luab.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/luab.c b/luab.c index 241121d..07d2051 100644 --- a/luab.c +++ b/luab.c @@ -84,6 +84,7 @@ int luab_getmacro(lua_State* L, sds macro){ if(LUA_TFUNCTION!=lua_getfield(L,1,macro)) return -1; lua_remove(L,1); + return i; } void luab_setmacro(lua_State* L, const char* macro, const char* code,int type){ int rc; @@ -104,7 +105,5 @@ void luab_setmacro(lua_State* L, const char* macro, const char* code,int type){ lua_setfield(L,1,macro); printf("gettop %d\n",lua_gettop(L)); lua_settop(L,0); - - }