diff options
| -rw-r--r-- | lbaselib.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.204 2008/02/14 16:03:09 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.205 2008/02/19 18:54:09 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 | */ |
| @@ -583,9 +583,9 @@ static int luaB_costatus (lua_State *L) { | |||
| 583 | 583 | ||
| 584 | 584 | ||
| 585 | static int luaB_corunning (lua_State *L) { | 585 | static int luaB_corunning (lua_State *L) { |
| 586 | if (lua_pushthread(L)) | 586 | int ismain = lua_pushthread(L); |
| 587 | lua_pushnil(L); /* main thread is not a coroutine */ | 587 | lua_pushboolean(L, ismain); |
| 588 | return 1; | 588 | return 2; |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | 591 | ||
