[Bug 23768] winhelp: Some images not shown in certain 16-bit Help files

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Dec 13 10:54:49 CST 2015


https://bugs.winehq.org/show_bug.cgi?id=23768

--- Comment #9 from Jice <wine at cardot.net> ---
Here is a patch to wine winhlp32 so that it behaves like MS one:

@@ -507,6 +514,16 @@ static BOOL HLPFILE_FindSubFile(HLPFILE* hlpfile, LPCSTR
name, BYTE **subbuf, BY
     WINE_TRACE("looking for file '%s'\n", name);
     ptr = HLPFILE_BPTreeSearch(hlpfile->file_buffer +
GET_UINT(hlpfile->file_buffer, 4),
                                name, comp_FindSubFile);
+    if (!ptr)
+    {   // BUG 23768
+        CHAR c = *name++;
+        if (c == 124)
+        {
+            WINE_TRACE("not found. try '%s'\n", name);
+            ptr = HLPFILE_BPTreeSearch(hlpfile->file_buffer +
GET_UINT(hlpfile->file_buffer, 4),
+                                       name, comp_FindSubFile);
+        }
+    }
     if (!ptr) return FALSE;
     *subbuf = hlpfile->file_buffer + GET_UINT(ptr, strlen(name)+1);
     if (*subbuf >= hlpfile->file_buffer + hlpfile->file_buffer_size)

please comment on the patch.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list