From f64eca5d9bf5b87c34c9bb2ded8b0a0ab424a9db Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 2 Apr 2024 23:15:31 +0200 Subject: [DYNAREC] Small fixed on dynarec block protection --- src/dynarec/dynarec_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit 1.4.1