diff options
| author | niubinghui <[email protected]> | 2024-08-19 14:54:43 +0800 |
|---|---|---|
| committer | niubinghui <[email protected]> | 2024-08-19 14:54:43 +0800 |
| commit | cb4f940a35400a77b4bb40e76ecc57f329161ee9 (patch) | |
| tree | 8c6381734ea1373ab5db2e7a344acd429c3a60cc /src/lua_binding_functions.c | |
| parent | 4898a47663a838a490ec6ff282cf72076745537d (diff) | |
【修改】整体功能测试过程中修改部分输出及BugFIX
Diffstat (limited to 'src/lua_binding_functions.c')
| -rw-r--r-- | src/lua_binding_functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua_binding_functions.c b/src/lua_binding_functions.c index 2448b49..383bbb0 100644 --- a/src/lua_binding_functions.c +++ b/src/lua_binding_functions.c @@ -529,7 +529,7 @@ int lua_mq_destory_topic(lua_State *state) int lua_mq_subscribe_topic(lua_State *state) { /* 参数个数检查 */ - if (lua_gettop(state) != 2) + if (lua_gettop(state) != 4) { lua_settop(state, 0); return 0; @@ -547,7 +547,7 @@ int lua_mq_subscribe_topic(lua_State *state) int plugin_id = lua_tointeger(state, -1); lua_pop(state, 1); - int on_message_ref = luaL_ref(state, -1); + int on_message_ref = luaL_ref(state, LUA_REGISTRYINDEX); if (on_message_ref == LUA_REFNIL) { lua_settop(state, 0); |
