Eric Pouech : dbghelp: Fix module name construction.

Alexandre Julliard julliard at winehq.org
Tue Nov 16 16:32:28 CST 2021


Module: wine
Branch: master
Commit: e00f0d81fbf4a4153141bff6126715c746666406
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e00f0d81fbf4a4153141bff6126715c746666406

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Tue Nov 16 17:46:49 2021 +0100

dbghelp: Fix module name construction.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/module.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 302f85b0747..b08a536eefa 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -103,13 +103,13 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size)
     const WCHAR *ptr, *endptr;
     size_t      len, l;
 
-    ptr = get_filename(in, endptr = in + lstrlenW(in));
+    endptr = in + lstrlenW(in);
+    endptr -= match_ext(in, endptr - in);
+    ptr = get_filename(in, endptr);
     len = min(endptr - ptr, size - 1);
     memcpy(out, ptr, len * sizeof(WCHAR));
     out[len] = '\0';
-    if (len > 4 && (l = match_ext(out, len)))
-        out[len - l] = '\0';
-    else if (is_wine_loader(out))
+    if (is_wine_loader(out))
         lstrcpynW(out, S_WineLoaderW, size);
     else
     {




More information about the wine-cvs mailing list