https://bugs.winehq.org/show_bug.cgi?id=23768
--- Comment #12 from Jice wine@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 ;)