and terminate if nothing is valid

This commit is contained in:
Palmer Dabbelt 2018-06-01 00:06:58 -07:00
parent 1f6a3b40b7
commit 516ff59f6d
1 changed files with 1 additions and 1 deletions

View File

@ -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. */