aboutsummaryrefslogtreecommitdiff
path: root/src/lua/lcorolib.c
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-01-22 17:54:39 +0800
committerLi Jin <dragon-fly@qq.com>2021-01-22 17:54:39 +0800
commit236bcc6e10f59b9336603571f1683cbe4aa411a9 (patch)
tree7116190d16a12bfcb0819e802c6e1d4ac8b0ec70 /src/lua/lcorolib.c
parentf61b96675547c8bf40c7f646e3766f4139efd927 (diff)
downloadyuescript-236bcc6e10f59b9336603571f1683cbe4aa411a9.tar.gz
yuescript-236bcc6e10f59b9336603571f1683cbe4aa411a9.tar.bz2
yuescript-236bcc6e10f59b9336603571f1683cbe4aa411a9.zip
update included Lua.
Diffstat (limited to 'src/lua/lcorolib.c')
-rw-r--r--src/lua/lcorolib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lua/lcorolib.c b/src/lua/lcorolib.c
index c165031..ed7c58b 100644
--- a/src/lua/lcorolib.c
+++ b/src/lua/lcorolib.c
@@ -75,8 +75,11 @@ static int luaB_auxwrap (lua_State *L) {
75 int r = auxresume(L, co, lua_gettop(L)); 75 int r = auxresume(L, co, lua_gettop(L));
76 if (r < 0) { /* error? */ 76 if (r < 0) { /* error? */
77 int stat = lua_status(co); 77 int stat = lua_status(co);
78 if (stat != LUA_OK && stat != LUA_YIELD) /* error in the coroutine? */ 78 if (stat != LUA_OK && stat != LUA_YIELD) { /* error in the coroutine? */
79 lua_resetthread(co); /* close its tbc variables */ 79 stat = lua_resetthread(co); /* close its tbc variables */
80 lua_assert(stat != LUA_OK);
81 lua_xmove(co, L, 1); /* copy error message */
82 }
80 if (stat != LUA_ERRMEM && /* not a memory error and ... */ 83 if (stat != LUA_ERRMEM && /* not a memory error and ... */
81 lua_type(L, -1) == LUA_TSTRING) { /* ... error object is a string? */ 84 lua_type(L, -1) == LUA_TSTRING) { /* ... error object is a string? */
82 luaL_where(L, 1); /* add extra info, if available */ 85 luaL_where(L, 1); /* add extra info, if available */