From c085cb52c5546ae4db3ca9af40d9395413ad75a4 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Wed, 24 Dec 2025 22:49:15 +0100 Subject: [PATCH] oh --- src/lua_rds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lua_rds.c b/src/lua_rds.c index 99a64e0..1643023 100644 --- a/src/lua_rds.c +++ b/src/lua_rds.c @@ -624,17 +624,20 @@ void lua_group_ref(RDSGroup* group, int ref) { lua_rawgeti(L, LUA_REGISTRYINDEX, ref); if (lua_isfunction(L, -1)) { - if (lua_pcall(L, 3, 3, 0) == LUA_OK) { + if (lua_pcall(L, 0, 3, 0) == LUA_OK) { if (!lua_isinteger(L, -1)) { pthread_mutex_unlock(&lua_mutex); + lua_pop(L, 1); return; } if (!lua_isinteger(L, -2)) { pthread_mutex_unlock(&lua_mutex); + lua_pop(L, 1); return; } if (!lua_isinteger(L, -3)) { pthread_mutex_unlock(&lua_mutex); + lua_pop(L, 1); return; } group->d = luaL_checkinteger(L, -1);