diff options
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -9646,12 +9646,19 @@ lua_task_resume (struct lua_task *self, int index) n = 2; } +#if LUA_VERSION_NUM >= 504 + int nresults = 0; + int res = lua_resume (L, NULL, n, &nresults); +#else int res = lua_resume (L, NULL, n); + int nresults = lua_gettop (L); +#endif + struct error *error = NULL; if (res == LUA_YIELD) { // AFAIK we don't get any good error context information from here - if (lua_task_schedule (self, lua_gettop (L), &error)) + if (lua_task_schedule (self, nresults, &error)) return; } // For simplicity ignore any results from successful returns |