about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-07-10 18:28:18 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-07-10 18:28:18 +0200
commitb39fbc0cfddea724f877756c587571127bd22edf (patch)
tree0649a98202885991e857d485fc280889d981d263
parentf000951fc970708bfa0dd5d357a334b8cfc41eb0 (diff)
downloadbox64-b39fbc0cfddea724f877756c587571127bd22edf.tar.gz
box64-b39fbc0cfddea724f877756c587571127bd22edf.zip
[DYNAREC] Stop building block if protection of next byte is 0 without the Custom flags
-rwxr-xr-xsrc/dynarec/dynarec_arm64_pass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynarec/dynarec_arm64_pass.c b/src/dynarec/dynarec_arm64_pass.c
index a3d235cd..bbc028fa 100755
--- a/src/dynarec/dynarec_arm64_pass.c
+++ b/src/dynarec/dynarec_arm64_pass.c
@@ -100,7 +100,7 @@ uintptr_t arm_pass(dynarec_arm_t* dyn, uintptr_t addr)
         if(!ok && !need_epilog && dyn->insts && (addr < (dyn->start+dyn->isize))) {
             ok = 1;
         }
-        if(!ok && !need_epilog && !dyn->insts && getProtection(addr+3))
+        if(!ok && !need_epilog && !dyn->insts && getProtection(addr+3)&~PROT_CUSTOM)
             if(*(uint32_t*)addr!=0) {   // check if need to continue (but is next 4 bytes are 0, stop)
                 uintptr_t next = get_closest_next(dyn, addr);
                 if(next && (