From 5744fb45cfb5631dd5dbec05a426b051ef0227a3 Mon Sep 17 00:00:00 2001 From: "Kirill K. Smirnov" Date: Fri, 25 Apr 2008 19:38:30 +0400 Subject: [PATCH] winhelp: We can reference any page in HLPFILE_BrowsePage(). Perform similar change in HLPFILE_DoReadHlpFile() for the symmetry. --- programs/winhelp/hlpfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index f5935a1fc8..ca46d3a00c 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -327,7 +327,7 @@ static BOOL HLPFILE_DoReadHlpFile(HLPFILE *hlpfile, LPCSTR lpszPath) offset = (ref - 0x0C) & 0x3FFF; } - if (hlpfile->version <= 16 && index != old_index && index != 0) + if (hlpfile->version <= 16 && index != old_index && old_index != -1) { /* we jumped to the next block, adjust pointers */ ref -= 12; @@ -1770,7 +1770,7 @@ BOOL HLPFILE_BrowsePage(HLPFILE_PAGE* page, struct RtfData* rd) offset = (ref - 0x0C) & 0x3FFF; } - if (hlpfile->version <= 16 && index != old_index && index != 0) + if (hlpfile->version <= 16 && index != old_index && old_index != -1) { /* we jumped to the next block, adjust pointers */ ref -= 12;