From f15899f548a49380871c1a08fea6189a9136ea43 Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Sat, 11 Jun 2016 14:23:39 -0400 Subject: [PATCH] I goofed when updating the find opcode, fix failure --- source/interp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/interp.c b/source/interp.c index 5d37a53..fecb7b5 100644 --- a/source/interp.c +++ b/source/interp.c @@ -170,8 +170,8 @@ exec_bytecode(uint8_t *bytecode, uint16_t ver, uint32_t len, int debug) if ((uint8_t *)new_offset != NULL) { // Pattern found, set found state flag found = 1; + offset = new_offset - (uint32_t)current_mode->memory; } - offset = offset - (uint32_t)current_mode->memory; code += *(code - 1); break; case OP_BACK: @@ -394,10 +394,10 @@ exec_bytecode(uint8_t *bytecode, uint16_t ver, uint32_t len, int debug) } if (offset > current_mode->size) { // Went out of bounds. Error. + abort("seeked out of bounds\n"); #ifndef LOADER - fprintf(stderr, "%x", offset); + fprintf(stderr, " -> %x", offset); #endif - abort("seeked out of bounds\n"); } #ifndef LOADER -- 2.39.5