From 03af7e9e2d5ece78b1557846f04dead997f33d52 Mon Sep 17 00:00:00 2001 From: Wendal Chen Date: Fri, 25 Oct 2024 07:42:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20luat=5Fbot=5Fasset=5Fstatus=5Fget?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E7=BC=BA=E8=BF=94=E5=9B=9E=E5=80=BC=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/antbot/binding/luat_lib_antbot.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/antbot/binding/luat_lib_antbot.c b/components/antbot/binding/luat_lib_antbot.c index d5f331d7..e58675e3 100644 --- a/components/antbot/binding/luat_lib_antbot.c +++ b/components/antbot/binding/luat_lib_antbot.c @@ -135,13 +135,11 @@ static int luat_bot_data_publish(lua_State *L) { int ret = -1; uint8_t *data; - size_t data_len; - int len; + size_t data_len = 0; data = luaL_checklstring(L, 1, &data_len); ret = bot_data_publish(data, data_len); -exit: lua_pushinteger(L, ret); return 1; } @@ -163,7 +161,7 @@ static int luat_bot_device_status_get(lua_State *L) @string asset_id 资源ID @return int 资源状态 */ -static luat_bot_asset_status_get(lua_State *L) +static int luat_bot_asset_status_get(lua_State *L) { int ret = -1; if (!lua_isstring(L, 1)) {