From e676d3dae62b5fe710a9c80141e48e74d51819af Mon Sep 17 00:00:00 2001 From: Gleb Gagarin Date: Fri, 11 Aug 2017 17:46:35 -0700 Subject: Fixed off-by-one error in previous commit --- src/target/riscv/riscv-013.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index 747488e..6dc5bef 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -1374,7 +1374,7 @@ static int read_memory(struct target *target, target_addr_t address, size_t rereads = reads; for (riscv_addr_t i = start; i < count; ++i) { - if (i == count - 1) { + if (i == count) { // don't do actual read in this batch, // we will do it later after we disable autoexec // -- cgit v1.1