about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/dynarec_native_pass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c
index e03b6655..39ee7a7b 100644
--- a/src/dynarec/dynarec_native_pass.c
+++ b/src/dynarec/dynarec_native_pass.c
@@ -217,11 +217,11 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int
         int ok_to_continue = (getProtection(addr) && getProtection(addr+1));
         if(ok && (!ok_to_continue || !(*(uint16_t*)addr))) {
             if(box64_dynarec_dump) dynarec_log(LOG_NONE, "Stopping block at %p reason: %s\n", (void*)addr, ok_to_continue?"Address is not readable":"Next opcode is 00 00");
-            ok = 0;
+            ok = ok_to_continue?0:-1;
             need_epilog = 1;
         }
         if(dyn->forward) {
-            if(dyn->forward_to == addr && !need_epilog && ok_to_continue) {
+            if(dyn->forward_to == addr && !need_epilog && ok_to_continue && ok>=0) {
                 // we made it!
                 reset_n = get_first_jump(dyn, addr);
                 if(box64_dynarec_dump) dynarec_log(LOG_NONE, "Forward extend block for %d bytes %s%p -> %p (ninst %d - %d)\n", dyn->forward_to-dyn->forward, dyn->insts[dyn->forward_ninst].x64.has_callret?"(opt. call) ":"", (void*)dyn->forward, (void*)dyn->forward_to, reset_n, ninst);