about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-02-11 15:39:25 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-02-11 15:39:25 +0100
commitc0184f926dd98792f313194d3b80a92f4fe1c04a (patch)
treec4c4d24f1ea2c7ffe9793652ea3d0485aef11ce4 /src
parenta69e81f0345b5e317e08faa010325c9a01232d09 (diff)
downloadbox64-c0184f926dd98792f313194d3b80a92f4fe1c04a.tar.gz
box64-c0184f926dd98792f313194d3b80a92f4fe1c04a.zip
Small fix for FindNearestSymbolName
Diffstat (limited to 'src')
-rw-r--r--src/elfs/elfloader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/elfs/elfloader.c b/src/elfs/elfloader.c
index 9c5a9597..4edd194b 100644
--- a/src/elfs/elfloader.c
+++ b/src/elfs/elfloader.c
@@ -1464,7 +1464,7 @@ const char* FindNearestSymbolName(elfheader_t* h, void* p, uintptr_t* start, uin
         return ret;
     if(!h) {
         if(getProtection((uintptr_t)p)&(PROT_READ)) {
-            uintptr_t adj_p = ((uintptr_t)p)&~(sizeof(onebridge_t));
+            uintptr_t adj_p = ((uintptr_t)p)&~(sizeof(onebridge_t)-1);
             if(*(uint8_t*)(adj_p)==0xCC && *(uint8_t*)(adj_p+1)=='S' && *(uint8_t*)(adj_p+2)=='C') {
                 ret = getBridgeName((void*)adj_p);
                 if(ret) {