From f96ba8c1aac1504baeb90521302e3ef820525b69 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Thu, 10 Aug 2023 11:58:05 -0700 Subject: [PATCH] ARM: Fix warning --- src/arm/decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arm/decoder.c b/src/arm/decoder.c index 1c98c3002..01622cc9d 100644 --- a/src/arm/decoder.c +++ b/src/arm/decoder.c @@ -573,7 +573,7 @@ uint32_t ARMResolveMemoryAccess(struct ARMInstructionInfo* info, struct ARMRegis if (info->memory.format & ARM_MEMORY_IMMEDIATE_OFFSET) { offset = info->memory.offset.immediate; } else if (info->memory.format & ARM_MEMORY_REGISTER_OFFSET) { - offset = info->memory.offset.reg == ARM_PC ? pc : regs->gprs[info->memory.offset.reg]; + offset = info->memory.offset.reg == ARM_PC ? pc : (uint32_t) regs->gprs[info->memory.offset.reg]; } if (info->memory.format & ARM_MEMORY_SHIFTED_OFFSET) { uint8_t shiftSize = info->memory.offset.shifterImm;