summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-11 23:46:31 +0800
committerruki <[email protected]>2025-12-12 09:00:45 +0800
commit334605bbe1bbe5b6b00b920b1228ef26b6288939 (patch)
tree66536b1eee39ae02469a9d4aaf4049a1bd1a00be
parent37bdf54bca0239804274185501064c44256c876e (diff)
fix compile error
-rw-r--r--core/src/xmake/binutils/mslib/extractlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/xmake/binutils/mslib/extractlib.c b/core/src/xmake/binutils/mslib/extractlib.c
index 5dec97f3e..8912070ae 100644
--- a/core/src/xmake/binutils/mslib/extractlib.c
+++ b/core/src/xmake/binutils/mslib/extractlib.c
@@ -124,8 +124,8 @@ tb_bool_t xm_binutils_mslib_extract(tb_stream_ref_t istream, tb_char_t const *ou
is_longname_table = tb_true;
} else if (tb_isdigit(header.name[1])) {
// offset into long name table (/123)
- tb_long_t offset = xm_binutils_mslib_parse_decimal(header.name + 1, 15);
- if (offset >= 0 && offset < longnames_size) {
+ tb_int64_t offset = xm_binutils_mslib_parse_decimal(header.name + 1, 15);
+ if (offset >= 0 && (tb_size_t)offset < longnames_size) {
// copy from longnames
// names in longnames are null-terminated
tb_strlcpy(member_name, longnames + offset, sizeof(member_name));