CHM tools wrong parsing of 13h params of rows in [WINDOWS] section from INI file (.hhp)
Original Reporter info from Mantis: Mario Zoppetti
-
Reporter name:
Original Reporter info from Mantis: Mario Zoppetti
- Reporter name:
Description:
Function TCHMWindow.load_from_ini from "packages\chm\src\chmtypes.pas"
wrongly parses argument nr. 13 in INI file section "[WINDOWS]".
Documentation from table 5.51 (http://www.nongnu.org/chmspec/latest/INI.html) specified that arg. 13 is the initial position of the window on the screen in the format: [left, top, right, bottom].
Current tokenizer implementation fails to split the string and parse brackets if there is any options from arg. 13 on.
Steps to reproduce:
compile any "htmlhelp.hhp" produced by DocBook using the command:
path_to_chmtools\chmcmd.exe" --verbosity 5 htmlhelp.hhp
any htmlhelp.hhp file contains a section like:
[WINDOWS]
Main="Title","toc.hhc","zzzzzz.hhk","zzzzzz.html","zzzzzz.html",,,,,0x32520,,0x603006,,,,,,,,0
If you manually remove ",,,,0" from the end of the row chmcmd.exe is able to compile because the parser stop work before reaching the broken steps.
Additional information:
Attached a fixed version of chmtypes.pas
Mantis conversion info:
- Mantis ID: 25062
- OS: 7
- OS Build: SP1
- Platform: Windows
- Version: 2.6.2
- Fixed in version: 2.6.4
- Fixed in revision: 25757 (#d670d9ff)