mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
winhlp32: Fix offsets handling for old 3.0 files.
This commit is contained in:
parent
deb98a4e83
commit
4c387a9567
@ -283,7 +283,7 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
|
||||
OFSTRUCT ofs;
|
||||
BYTE* buf;
|
||||
DWORD ref = 0x0C;
|
||||
unsigned index, old_index, offset, len, offs;
|
||||
unsigned index, old_index, offset, len, offs, topicoffset;
|
||||
|
||||
hFile = OpenFile(lpszPath, &ofs, OF_READ);
|
||||
if (hFile == HFILE_ERROR) return FALSE;
|
||||
@ -339,7 +339,11 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
|
||||
switch (buf[0x14])
|
||||
{
|
||||
case 0x02:
|
||||
if (!HLPFILE_AddPage(hlpfile, buf, end, ref, index * 0x8000L + offs)) return FALSE;
|
||||
if (hlpfile->version <= 16)
|
||||
topicoffset = ref + index * 12;
|
||||
else
|
||||
topicoffset = index * 0x8000 + offs;
|
||||
if (!HLPFILE_AddPage(hlpfile, buf, end, ref, topicoffset)) return FALSE;
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
|
Loading…
Reference in New Issue
Block a user