summaryrefslogtreecommitdiff
path: root/core/src/xmake/utf8/codepoint.c
diff options
context:
space:
mode:
authorruki <[email protected]>2026-01-21 00:54:45 +0800
committerruki <[email protected]>2026-01-21 00:54:45 +0800
commit2eeb428148125962177e2b51a2bb4aa3c95a55ff (patch)
treeb75bb3b78278818c352ef525954c8ca96afc3062 /core/src/xmake/utf8/codepoint.c
parent8a1c05dc44ebc3655299af650dec03204ada9dd8 (diff)
fix review issues
Diffstat (limited to 'core/src/xmake/utf8/codepoint.c')
-rw-r--r--core/src/xmake/utf8/codepoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/xmake/utf8/codepoint.c b/core/src/xmake/utf8/codepoint.c
index 15828a7ab..29aee0f01 100644
--- a/core/src/xmake/utf8/codepoint.c
+++ b/core/src/xmake/utf8/codepoint.c
@@ -62,9 +62,10 @@ tb_int_t xm_utf8_codepoint(lua_State *lua) {
tb_int_t n = (tb_int_t)(pose - posi) + 1;
luaL_checkstack(lua, n, "string slice too long");
+ int nresults = lua_gettop(lua);
if (!xm_utf8_codepoint_impl(s, len, posi, pose, !lax, xm_utf8_codepoint_cb, lua)) {
return luaL_error(lua, XM_UTF8_MSGInvalid);
}
- return n;
+ return lua_gettop(lua) - nresults;
}