From 03cbd305c65c46f236607247d44ef68a1fd0ace9 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Fri, 28 Feb 2025 19:34:07 +0100 Subject: [PATCH] replaces literal constant with symbolic definition --- src/iss/arch/riscv_hart_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iss/arch/riscv_hart_common.h b/src/iss/arch/riscv_hart_common.h index 079e320..db5db7a 100644 --- a/src/iss/arch/riscv_hart_common.h +++ b/src/iss/arch/riscv_hart_common.h @@ -338,7 +338,7 @@ struct riscv_hart_common { const auto fsize = pseg->get_file_size(); // 0x42c/0x0 const auto seg_data = pseg->get_data(); const auto type = pseg->get_type(); - if(type == 1 && fsize > 0) { + if(type == ELFIO::PT_LOAD && fsize > 0) { auto res = cb(pseg->get_physical_address(), fsize, reinterpret_cast(seg_data)); if(res != iss::Ok) CPPLOG(ERR) << "problem writing " << fsize << "bytes to 0x" << std::hex << pseg->get_physical_address();