From 197dfb660a35825d0bb46f8ef69884d7ec00c410 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 21 Jan 2026 22:09:09 +0800 Subject: fix path.filename and lastof --- core/src/xmake/utf8/utf8.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/src') diff --git a/core/src/xmake/utf8/utf8.c b/core/src/xmake/utf8/utf8.c index 1e76c2a7e..f4da25935 100644 --- a/core/src/xmake/utf8/utf8.c +++ b/core/src/xmake/utf8/utf8.c @@ -395,9 +395,7 @@ tb_long_t xm_utf8_lastof_impl(tb_char_t const* s, tb_size_t len, tb_char_t const } if (last) { - tb_long_t count = xm_utf8_len_impl(s, len, 1, last - s, tb_true, tb_null); - if (count < 0) return 0; - return count + 1; + return (tb_long_t)(last - s + 1); } return 0; } -- cgit v1.3.1