about summary refs log tree commit diff stats
path: root/src/dynarec/dynarec_native.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-04-02 23:15:31 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-04-02 23:21:21 +0200
commitf64eca5d9bf5b87c34c9bb2ded8b0a0ab424a9db (patch)
tree3b162b8dcb4e60c9e3752690e67f662cfae0fb89 /src/dynarec/dynarec_native.c
parentbdd5e7018a928a4d65b9ec1f8f0735d23ea851ba (diff)
downloadbox64-f64eca5d9bf5b87c34c9bb2ded8b0a0ab424a9db.tar.gz
box64-f64eca5d9bf5b87c34c9bb2ded8b0a0ab424a9db.zip
[DYNAREC] Small fixed on dynarec block protection
Diffstat (limited to 'src/dynarec/dynarec_native.c')
-rw-r--r--src/dynarec/dynarec_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c
index 6dca4140..f3af8d88 100644
--- a/src/dynarec/dynarec_native.c
+++ b/src/dynarec/dynarec_native.c
@@ -501,7 +501,7 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit
         return NULL;
     }
     // protect the block of it goes over the 1st page
-    if((addr&~box64_pagesize)!=(end&~box64_pagesize)) // need to protect some other pages too
+    if((addr&~(box64_pagesize-1))!=(end&~(box64_pagesize-1))) // need to protect some other pages too
         protectDB(addr, end-addr);  //end is 1byte after actual end
     // compute hash signature
     uint32_t hash = X31_hash_code((void*)addr, end-addr);