From 8e45679d3dbfe1af62b50d15514aa7f188bcf43e Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Tue, 23 Feb 2021 16:19:01 +0800 Subject: [PATCH] bugfix : coroutine.wrap for snlua --- service-src/service_snlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service-src/service_snlua.c b/service-src/service_snlua.c index 81a1604a..4e9381ce 100644 --- a/service-src/service_snlua.c +++ b/service-src/service_snlua.c @@ -195,7 +195,7 @@ timing_resume(lua_State *L, int co_index, int n) { lua_rawset(L, lua_upvalueindex(1)); // set start time } - int r = auxresume(L, co, lua_gettop(L) - 1); + int r = auxresume(L, co, n); if (timing_enable(L, co_index, &start_time)) { double total_time = timing_total(L, co_index);