Skip to content

Commit

Permalink
Fixed the search for the region closest to the function
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Goncharov authored and mochaaP committed Jan 21, 2025
1 parent 3aed17c commit 57c19c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ void *funchook_resolve_func(funchook_t *funchook, void *func)
if ((void*)lm->l_addr <= func) {
if (lmap == NULL) {
lmap = lm;
} else if (lmap->l_addr > lm->l_addr) {
} else if (lmap->l_addr < lm->l_addr) {
lmap = lm;
}
}
Expand Down

0 comments on commit 57c19c1

Please sign in to comment.