GrandOrgue / GoOdf

A tool for creating/editing organ definition files for GrandOrgue
GNU General Public License v3.0
11 stars 1 forks source link

Whitespace and comments can cause incorrect reading #12

Closed larspalo closed 1 year ago

larspalo commented 1 year ago

Starting and trailing whitespace in an external odf entry, as well as possible existance of a GO comment (;) on a key/value line can cause incorrect readings - especially with numerical values.

larspalo commented 1 year ago

I've committed a fix for this issue. It seems to be working fine, but it does have a side effect that the actual read .organ file will be modified to remove any starting and trailing whitespace in a value (after the = sign), and also the removal of any comment that occur on the same line as a key/value pair.

Personally, I consider this non problematic as up until not long ago comments on the same line as a key/value pair was disallowed in GO. The whitespaces would be ignored by GO, but the wxFileConfig reader has problems with them for numerical values, so I decided to just remove them as they serve no practical function anyway.