From 2a65cda50b7052e603e099430232b3137da88207 Mon Sep 17 00:00:00 2001 From: qiuyu Date: Thu, 16 Jun 2022 19:42:35 +0800 Subject: [PATCH] fixed aac2dcc from https://gitee.com/qiuyu22/ark_runtime_core_1/pulls/162 File items codedx fixing Fix mix-up of signed and unsigned numbers Signed-off-by: qiuyu --- libpandafile/file_items.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpandafile/file_items.cpp b/libpandafile/file_items.cpp index 9b50698..f6093cc 100644 --- a/libpandafile/file_items.cpp +++ b/libpandafile/file_items.cpp @@ -1375,7 +1375,7 @@ bool LineNumberProgramItem::EmitSpecialOpcode(uint32_t pc_inc, int32_t line_inc) return false; } - size_t opcode = (line_inc - LINE_BASE) + (pc_inc * LINE_RANGE) + OPCODE_BASE; + auto opcode = static_cast(line_inc - LINE_BASE) + static_cast(pc_inc * LINE_RANGE) + OPCODE_BASE; if (opcode > std::numeric_limits::max()) { return false; }