[PATCH 2/6] dbghelp: always search current directory when loading PE modules
Eric Pouech
eric.pouech at gmail.com
Tue Nov 16 10:47:02 CST 2021
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/dbghelp/pe_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c
index 35db3edf40f..77ae122901a 100644
--- a/dlls/dbghelp/pe_module.c
+++ b/dlls/dbghelp/pe_module.c
@@ -791,7 +791,8 @@ struct module* pe_load_native_module(struct process* pcs, const WCHAR* name,
{
assert(name);
- if ((hFile = FindExecutableImageExW(name, pcs->search_path, loaded_name, NULL, NULL)) == NULL)
+ if ((hFile = FindExecutableImageExW(name, pcs->search_path, loaded_name, NULL, NULL)) == NULL &&
+ (hFile = FindExecutableImageExW(name, L".", loaded_name, NULL, NULL)) == NULL)
return NULL;
opened = TRUE;
}
More information about the wine-devel
mailing list