Explorar o código

fix: l_i2s_send的类型判断错误, lua_type并不会返回LUA_TINTEGER

Wendal Chen hai 1 ano
pai
achega
2772a6d82d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      luat/modules/luat_lib_i2s.c

+ 1 - 1
luat/modules/luat_lib_i2s.c

@@ -144,7 +144,7 @@ static int l_i2s_send(lua_State *L) {
     else {
         buff = (char*)luaL_checklstring(L, 2, &len);
     }
-    if (lua_type(L, 3) == LUA_TINTEGER) {
+    if (lua_type(L, 3) == LUA_TNUMBER) {
         len = luaL_checkinteger(L, 3);
     }
     int ret = luat_i2s_send(id, buff, len);