From 260ce8a472a219f1444a7c12091e3ae03561f5ea Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 15 Oct 2006 21:01:34 +0000 Subject: [PATCH] allow coroutine.corunning to return the main thread http://lua-users.org/lists/lua-l/2006-09/msg00751.html --- stepmania/src/lua-5.1/src/lbaselib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stepmania/src/lua-5.1/src/lbaselib.c b/stepmania/src/lua-5.1/src/lbaselib.c index 27677b3c00..24cdb1a93e 100644 --- a/stepmania/src/lua-5.1/src/lbaselib.c +++ b/stepmania/src/lua-5.1/src/lbaselib.c @@ -585,10 +585,8 @@ static int luaB_costatus (lua_State *L) { static int luaB_corunning (lua_State *L) { - if (lua_pushthread(L)) - return 0; /* main thread is not a coroutine */ - else - return 1; + lua_pushthread(L); + return 1; }