[Wine-patches] [CAD] hhctrl.ocx: use "clean" path to file (eterbug #2927)

Konstantin Kondratyuk kondratyuk на etersoft.ru
Ср Сен 2 15:37:55 MSD 2009


Повторное закрытие баги с chm-справкой

-- 
Best regards,
Konstantin Kondratyuk.
----------- следующая часть -----------
From a509fcf378a804d1a5647f06cec54091b68a0794 Mon Sep 17 00:00:00 2001
From: Konstantin Kondratyuk <kondratyuk на etersoft.ru>
Date: Wed, 2 Sep 2009 15:32:52 +0400
Subject: [PATCH] hhctrl.ocx: use "clean" path to file

---
 dlls/hhctrl.ocx/hhctrl.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c
index 81e20a9..d32f6c6 100644
--- a/dlls/hhctrl.ocx/hhctrl.c
+++ b/dlls/hhctrl.ocx/hhctrl.c
@@ -106,6 +106,8 @@ static BOOL resolve_filename(const WCHAR *filename, WCHAR *fullname, DWORD bufle
 HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR data)
 {
     WCHAR fullname[MAX_PATH];
+    WCHAR name[MAX_PATH];
+    int i;
 
     TRACE("(%p, %s, command=%s, data=%lx)\n",
           caller, debugstr_w( filename ),
@@ -136,7 +138,16 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
             index += 2; /* advance beyond "::" for calling NavigateToChm() later */
         }
 
-        if (!resolve_filename(filename, fullname, MAX_PATH))
+        strcpyW(name, filename);
+        for(i = 0; i < strlenW(filename); i++)
+            if(filename[i] == '>')
+            {
+                name[i] = '\0';
+                break;
+            }
+
+
+        if (!resolve_filename(name, fullname, MAX_PATH))
         {
             WARN("can't find %s\n", debugstr_w(filename));
             return 0;
-- 
1.6.3.3



Подробная информация о списке рассылки Wine-patches