aboutsummaryrefslogtreecommitdiff
path: root/lcorolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcorolib.c')
-rw-r--r--lcorolib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lcorolib.c b/lcorolib.c
index cdb5fedc..f7c9e165 100644
--- a/lcorolib.c
+++ b/lcorolib.c
@@ -146,7 +146,8 @@ static int luaB_costatus (lua_State *L) {
146 146
147 147
148static int luaB_yieldable (lua_State *L) { 148static 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