From d2e05589d738c3a1b563879435d5cc0830719fd1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 9 Apr 2002 16:46:56 -0300 Subject: bug: `resume' was returning its arguments, too --- lbaselib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbaselib.c b/lbaselib.c index b8d0bacb..20fa6382 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.63 2002/04/02 20:42:20 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.64 2002/04/05 18:54:31 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -441,6 +441,7 @@ static void base_open (lua_State *L) { static int luaB_resume (lua_State *L) { lua_State *co = (lua_State *)lua_getfrombox(L, lua_upvalueindex(1)); + lua_settop(L, 0); if (lua_resume(L, co) != 0) lua_error(L, "error running co-routine"); return lua_gettop(L); -- cgit v1.2.3-55-g6feb