Kirill K. Smirnov : winhlp32: Fix parsing system header of win3.0 help file .

Alexandre Julliard julliard at winehq.org
Tue Aug 5 07:26:45 CDT 2008


Module: wine
Branch: master
Commit: 737785635268f21fab3eab8af0d0e10f9c3faddf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=737785635268f21fab3eab8af0d0e10f9c3faddf

Author: Kirill K. Smirnov <lich at math.spbu.ru>
Date:   Mon Aug  4 03:50:52 2008 +0400

winhlp32: Fix parsing system header of win3.0 help file.

---

 programs/winhlp32/hlpfile.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c
index 2e3db2c..870bac7 100644
--- a/programs/winhlp32/hlpfile.c
+++ b/programs/winhlp32/hlpfile.c
@@ -1886,6 +1886,17 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
     hlpfile->flags = flags;
     hlpfile->charset = DEFAULT_CHARSET;
 
+    if (hlpfile->version <= 16)
+    {
+        char *str = (char*)buf + 0x15;
+
+        hlpfile->lpszTitle = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1);
+        if (!hlpfile->lpszTitle) return FALSE;
+        lstrcpy(hlpfile->lpszTitle, str);
+        WINE_TRACE("Title: %s\n", hlpfile->lpszTitle);
+        /* Nothing more to parse */
+        return TRUE;
+    }
     for (ptr = buf + 0x15; ptr + 4 <= end; ptr += GET_USHORT(ptr, 2) + 4)
     {
         char *str = (char*) ptr + 4;




More information about the wine-cvs mailing list