diff --git a/qemu/exec.c b/qemu/exec.c index 5c490044..f5c1a9a1 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -1636,7 +1636,7 @@ static MemTxResult subpage_read(struct uc_struct* uc, void *opaque, hwaddr addr, *data = lduw_p(buf); return MEMTX_OK; case 4: - *data = ldl_p(buf); + *data = (uint32_t)ldl_p(buf); return MEMTX_OK; case 8: *data = ldq_p(buf);