From: chaoskagami Date: Sat, 11 Jun 2016 18:23:39 +0000 (-0400) Subject: I goofed when updating the find opcode, fix failure X-Git-Tag: v0.0.9~7 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=f15899f548a49380871c1a08fea6189a9136ea43;p=corbenik%2Fcorbenik.git I goofed when updating the find opcode, fix failure --- 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