diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2018-06-01 00:06:58 -0700 |
---|---|---|
committer | Palmer Dabbelt <palmer@dabbelt.com> | 2018-06-01 00:06:58 -0700 |
commit | 516ff59f6d4b4fc871cc171b1fbe5b5889f9c5b0 (patch) | |
tree | 86f19cf23a38735d40d235e4d13acd702bfdef28 | |
parent | 1f6a3b40b70dc0f51586f8377f0eb34476f5d7df (diff) | |
download | riscv-openocd-516ff59f6d4b4fc871cc171b1fbe5b5889f9c5b0.zip riscv-openocd-516ff59f6d4b4fc871cc171b1fbe5b5889f9c5b0.tar.gz riscv-openocd-516ff59f6d4b4fc871cc171b1fbe5b5889f9c5b0.tar.bz2 |
and terminate if nothing is valid
-rw-r--r-- | src/target/riscv/riscv-013.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c index b21bc20..cd5103f 100644 --- a/src/target/riscv/riscv-013.c +++ b/src/target/riscv/riscv-013.c @@ -2081,7 +2081,7 @@ static int read_memory_progbuf(struct target *target, target_addr_t address, result = execute_abstract_command(target, command); riscv013_clear_abstract_error(target); read_addr += size; - } while (result != ERROR_OK); + } while (result != ERROR_OK && read_addr < fin_addr); /* First valid read has just triggered. Result is in s1. */ |