diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-04-09 16:46:56 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-04-09 16:46:56 -0300 |
| commit | d2e05589d738c3a1b563879435d5cc0830719fd1 (patch) | |
| tree | 491fc9be97e8fad6eab2fd1b3e80643bc9264809 | |
| parent | 237969724f54eeefee057ae382237c8db54af44e (diff) | |
| download | lua-d2e05589d738c3a1b563879435d5cc0830719fd1.tar.gz lua-d2e05589d738c3a1b563879435d5cc0830719fd1.tar.bz2 lua-d2e05589d738c3a1b563879435d5cc0830719fd1.zip | |
bug: `resume' was returning its arguments, too
| -rw-r--r-- | lbaselib.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -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 | ||
| 442 | static int luaB_resume (lua_State *L) { | 442 | static 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); |
