Kirill K. Smirnov : winhelp: winhelp >3. 0 files always use 0x4000 as a divisor in TOPICPOS regardless of DecompressSize .
Module: wine Branch: master Commit: ae534def5400a7da2ef18bfff34addb6bbb81bfc URL: http://source.winehq.org/git/wine.git/?a=commit;h=ae534def5400a7da2ef18bfff3... Author: Kirill K. Smirnov <lich(a)math.spbu.ru> Date: Wed Dec 5 00:41:07 2007 +0300 winhelp: winhelp >3.0 files always use 0x4000 as a divisor in TOPICPOS regardless of DecompressSize. --- programs/winhelp/hlpfile.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index f9013e6..cd14193 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -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) {
participants (1)
-
Alexandre Julliard