diff options
| author | ruki <[email protected]> | 2026-01-21 22:09:09 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-21 22:09:09 +0800 |
| commit | 197dfb660a35825d0bb46f8ef69884d7ec00c410 (patch) | |
| tree | 271f4bce14ac31a35f89c7df2e51c27b27025043 /core/src/xmake/utf8 | |
| parent | 3a602442ced657fd07d9890176f1bc24ea1b346f (diff) | |
fix path.filename and lastof
Diffstat (limited to 'core/src/xmake/utf8')
| -rw-r--r-- | core/src/xmake/utf8/utf8.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; } |
