https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b2bcd8afdd6c47b4a403db4b75272a21dc93c904

commit b2bcd8afdd6c47b4a403db4b75272a21dc93c904
Author:     Andreas Maier <[email protected]>
AuthorDate: Thu Nov 22 22:14:24 2018 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Fri Apr 19 21:09:45 2019 +0200

    [DBGHELP] Set LastError for SymGetModuleBase-calls to ERROR_MOD_NOT_FOUND.
    
    Correct last error in module_find_by_addr.
---
 dll/win32/dbghelp/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dll/win32/dbghelp/module.c b/dll/win32/dbghelp/module.c
index 0173469bd6..aaa0ff6f98 100644
--- a/dll/win32/dbghelp/module.c
+++ b/dll/win32/dbghelp/module.c
@@ -417,7 +417,7 @@ struct module* module_find_by_addr(const struct process* 
pcs, DWORD64 addr,
                 return module;
         }
     }
-    SetLastError(ERROR_INVALID_ADDRESS);
+    SetLastError(ERROR_MOD_NOT_FOUND);
     return module;
 }
 

Reply via email to