* fix reading binary toc. Lazarus depends on it, and it name,local change changed order, and thus added empty names.

git-svn-id: trunk@42137 -
This commit is contained in:
marco 2019-05-30 10:44:52 +00:00
parent 2fdef04a28
commit 8ba75c847a

View File

@ -1361,7 +1361,7 @@ function TChmReader.GetTOCSitemap(ForceXML:boolean=false): TChmSiteMap;
Item: TChmSiteMapItem;
NextEntry: DWord;
TopicsIndex: DWord;
Title: String;
Title, Local : String;
begin
Toc.Position:= AItemOffset + 4;
Item := SiteMapITems.NewItem;
@ -1371,8 +1371,9 @@ function TChmReader.GetTOCSitemap(ForceXML:boolean=false): TChmSiteMap;
else
begin
TopicsIndex := LEtoN(TOC.ReadDWord);
Item.AddName(title);
Item.addLocal(LookupTopicByID(TopicsIndex, Title));
Local:=LookupTopicByID(TopicsIndex, Title);
Item.AddName(Title);
Item.AddLocal(Local);
end;
TOC.ReadDWord;
Result := LEtoN(TOC.ReadDWord);