diff options
| author | ruki <[email protected]> | 2025-11-09 22:34:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-09 22:34:50 +0800 |
| commit | bf2da8a3d7f04bf5ffcdce8fd4c334d5421d3494 (patch) | |
| tree | 054a98d5d2b875f9bb552c6848a31877e5afde4c /core/src/xmake/io/socket_send.c | |
| parent | f2f3821a0248b24941566c90e7aabcc0e7d95e77 (diff) | |
format core
Diffstat (limited to 'core/src/xmake/io/socket_send.c')
| -rw-r--r-- | core/src/xmake/io/socket_send.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/xmake/io/socket_send.c b/core/src/xmake/io/socket_send.c index d83b02add..3a11d0d43 100644 --- a/core/src/xmake/io/socket_send.c +++ b/core/src/xmake/io/socket_send.c @@ -52,10 +52,12 @@ tb_int_t xm_io_socket_send(lua_State *lua) { // get data and size tb_size_t size = 0; tb_byte_t const *data = tb_null; - if (xm_lua_isinteger(lua, 2)) + if (xm_lua_isinteger(lua, 2)) { data = (tb_byte_t const *)(tb_size_t)(tb_long_t)lua_tointeger(lua, 2); - if (xm_lua_isinteger(lua, 3)) + } + if (xm_lua_isinteger(lua, 3)) { size = (tb_size_t)lua_tointeger(lua, 3); + } if (!data || !size) { lua_pushinteger(lua, -1); lua_pushfstring(lua, "invalid data(%p) and size(%d)!", data, (tb_int_t)size); |
