aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/pl181.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/pl181.c')
-rw-r--r--hw/sd/pl181.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 4b1723418d..f5eb1e4012 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -175,7 +175,7 @@ static void pl181_send_command(pl181_state *s)
if (rlen < 0)
goto error;
if (s->cmd & PL181_CMD_RESPONSE) {
-#define RWORD(n) ((response[n] << 24) | (response[n + 1] << 16) \
+#define RWORD(n) (((uint32_t)response[n] << 24) | (response[n + 1] << 16) \
| (response[n + 2] << 8) | response[n + 3])
if (rlen == 0 || (rlen == 4 && (s->cmd & PL181_CMD_LONGRESP)))
goto error;