winhelp: winhelp >3.0 files always use 0x4000 as a divisor in TOPICPOS regardless of DecompressSize.

This commit is contained in:
Kirill K. Smirnov 2007-12-05 00:41:07 +03:00 committed by Alexandre Julliard
parent 56ab4a20e0
commit ae534def54

View File

@ -354,8 +354,16 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath)
{
BYTE* end;
index = (ref - 0x0C) / hlpfile->dsize;
offset = (ref - 0x0C) % hlpfile->dsize;
if (hlpfile->version <= 16)
{
index = (ref - 0x0C) / hlpfile->dsize;
offset = (ref - 0x0C) % hlpfile->dsize;
}
else
{
index = (ref - 0x0C) >> 14;
offset = (ref - 0x0C) & 0x3FFF;
}
if (hlpfile->version <= 16 && index != old_index && index != 0)
{