From 91e05dcabdb094ae59df666419e0ec7f4aed7cbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A9=B9=E6=98=8A?= Date: Tue, 26 Aug 2025 10:29:44 +0800 Subject: [PATCH] Fix unint and int MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: #ICUONJ Signed-off-by: 詹昊 --- ecmascript/dfx/hprof/rawheap_translate/rawheap_translate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecmascript/dfx/hprof/rawheap_translate/rawheap_translate.cpp b/ecmascript/dfx/hprof/rawheap_translate/rawheap_translate.cpp index 5ddf6dabe3..d8b4e96923 100644 --- a/ecmascript/dfx/hprof/rawheap_translate/rawheap_translate.cpp +++ b/ecmascript/dfx/hprof/rawheap_translate/rawheap_translate.cpp @@ -766,8 +766,8 @@ void RawHeapTranslateV2::BuildFieldEdges(Node *node, std::vector &refs) } for (auto &field : meta->fields) { - int index = field.offset / sizeof(uint64_t) - 1; - if (index < 0 || static_cast(index) >= refs.size()) { + size_t index = field.offset / sizeof(uint64_t) - 1; + if (index >= refs.size()) { continue; } -- Gitee