diff options
| author | ruki <[email protected]> | 2025-11-09 20:16:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-09 20:16:46 +0800 |
| commit | 12e00a411dfe202dcfa1de9a8511a802ce1af40d (patch) | |
| tree | 05c1dde2cc3897d627f983304127c45479153493 /core/src/xmake/base64/encode.c | |
| parent | 39189e3a1bd2979b7b454547b03e5926a8027431 (diff) | |
format single line
Diffstat (limited to 'core/src/xmake/base64/encode.c')
| -rw-r--r-- | core/src/xmake/base64/encode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/xmake/base64/encode.c b/core/src/xmake/base64/encode.c index d896cb55e..d5ce56306 100644 --- a/core/src/xmake/base64/encode.c +++ b/core/src/xmake/base64/encode.c @@ -39,10 +39,12 @@ tb_int_t xm_base64_encode(lua_State *lua) { // get data and size tb_size_t size = 0; tb_byte_t const *data = tb_null; - if (xm_lua_isinteger(lua, 1)) + if (xm_lua_isinteger(lua, 1)) { data = (tb_byte_t const *)(tb_size_t)(tb_long_t)lua_tointeger(lua, 1); - if (xm_lua_isinteger(lua, 2)) + } + if (xm_lua_isinteger(lua, 2)) { size = (tb_size_t)lua_tointeger(lua, 2); + } if (!data || !size) { lua_pushnil(lua); lua_pushfstring(lua, "invalid data(%p) and size(%d)!", data, (tb_int_t)size); |
