diff options
-rw-r--r-- | src/target/riscv/riscv-013.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 1744efb..edce7d1 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -2396,8 +2396,8 @@ static int write_memory(struct target *target, uint32_t address, case 4: value = buffer[4*i] | ((uint32_t) buffer[4*i+1] << 8) | - ((uint32_t) buffer[4*i+2] << 8) | - ((uint32_t) buffer[4*i+3] << 8); + ((uint32_t) buffer[4*i+2] << 16) | + ((uint32_t) buffer[4*i+3] << 24); break; default: return ERROR_FAIL; |