diff options
Diffstat (limited to 'lcorolib.c')
-rw-r--r-- | lcorolib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -146,7 +146,8 @@ static int luaB_costatus (lua_State *L) { | |||
146 | 146 | ||
147 | 147 | ||
148 | static int luaB_yieldable (lua_State *L) { | 148 | static int luaB_yieldable (lua_State *L) { |
149 | lua_pushboolean(L, lua_isyieldable(L)); | 149 | lua_State *co = lua_isnone(L, 1) ? L : getco(L); |
150 | lua_pushboolean(L, lua_isyieldable(co)); | ||
150 | return 1; | 151 | return 1; |
151 | } | 152 | } |
152 | 153 | ||