summaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-04-09 16:46:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-04-09 16:46:56 -0300
commitd2e05589d738c3a1b563879435d5cc0830719fd1 (patch)
tree491fc9be97e8fad6eab2fd1b3e80643bc9264809 /lbaselib.c
parent237969724f54eeefee057ae382237c8db54af44e (diff)
downloadlua-d2e05589d738c3a1b563879435d5cc0830719fd1.tar.gz
lua-d2e05589d738c3a1b563879435d5cc0830719fd1.tar.bz2
lua-d2e05589d738c3a1b563879435d5cc0830719fd1.zip
bug: `resume' was returning its arguments, too
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lbaselib.c b/lbaselib.c
index b8d0bacb..20fa6382 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.63 2002/04/02 20:42:20 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.64 2002/04/05 18:54:31 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -441,6 +441,7 @@ static void base_open (lua_State *L) {
441 441
442static int luaB_resume (lua_State *L) { 442static int luaB_resume (lua_State *L) {
443 lua_State *co = (lua_State *)lua_getfrombox(L, lua_upvalueindex(1)); 443 lua_State *co = (lua_State *)lua_getfrombox(L, lua_upvalueindex(1));
444 lua_settop(L, 0);
444 if (lua_resume(L, co) != 0) 445 if (lua_resume(L, co) != 0)
445 lua_error(L, "error running co-routine"); 446 lua_error(L, "error running co-routine");
446 return lua_gettop(L); 447 return lua_gettop(L);