hook/table.c: Populate links from first match

The loaded module list is kept in the order the modules are first
loaded. Using the first loaded module (i.e. the EXE) will help
ensure that multiple hook DLLs stack correctly. Previously the link
was taken from the most-recently loaded module.
This commit is contained in:
Decaf Code
2018-11-20 13:17:34 -05:00
parent a956987fe0
commit 7526c7274a
+1 -1
View File
@@ -93,7 +93,7 @@ static void hook_table_apply_to_iid(
sym = &syms[j];
if (hook_table_match_proc(&iate, sym)) {
if (sym->link != NULL) {
if (sym->link != NULL && *sym->link == NULL) {
*sym->link = *iate.ppointer;
}