[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 14:09:07 CST 2015
https://bugs.winehq.org/show_bug.cgi?id=23768
--- Comment #12 from Jice <wine at cardot.net> ---
thanks Kiril for the comments :)
so here is the new version:
@@ -507,6 +514,18 @@ 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)
+ { // Sometimes files with bitmap images are prefixes with '|' and
sometimes not.
+ // Unfortunately, there is no consensus among different pieces of
unofficial documentation.
+ // So remove leading '|' and try again.
+ CHAR c = *name++;
+ if (c == '|')
+ {
+ 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)
PS: are C++ style comments allowed in the wine source code? Browsing the source
code I cannot see a clear consensus either ;)
--
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