summaryrefslogtreecommitdiffstats
path: root/libpdbg/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpdbg/chip.c')
-rw-r--r--libpdbg/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 079592c..5acda73 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -188,7 +188,7 @@ static int ram_instructions(struct pdbg_target *thread_target, uint64_t *opcodes
if (thread->ram_instruction(thread, opcode, &scratch)) {
PR_DEBUG("%s: %d, %016" PRIx64 "\n", __FUNCTION__, __LINE__, opcode);
exception = 1;
- if (i >= 0 || i < len)
+ if (i >= 0 && i < len)
/* skip the rest and attempt to restore r0 and r1 */
i = len - 1;
else
OpenPOWER on IntegriCloud