Browse Source

Additional fixes to the chm quickref generation. Now both the MS help viewer and 7-zip are happy with the result.

git-svn-id: trunk@13476 -
andrew 16 years ago
parent
commit
dd9190e687
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/chm/src/chmtypes.pas

+ 1 - 1
packages/chm/src/chmtypes.pas

@@ -126,7 +126,7 @@ begin
   if ItemCount mod 5 = 0 then begin
   if ItemCount mod 5 = 0 then begin
     Inc(FQuickRefEntries);
     Inc(FQuickRefEntries);
     ReversePos := ($1000) - SizeOf(Word) - (SizeOf(Word)*FQuickRefEntries);
     ReversePos := ($1000) - SizeOf(Word) - (SizeOf(Word)*FQuickRefEntries);
-    Value := NtoLE(Word(CurrentPos - Size));
+    Value := NtoLE(Word(CurrentPos - Size - FHeaderSize));
     Move(Value, Buffer[ReversePos], SizeOf(Word));
     Move(Value, Buffer[ReversePos], SizeOf(Word));
   end;
   end;
 end;
 end;