Menu

#5 Incorrect parsing of integer and enum switches

open
nobody
None
5
2007-12-04
2007-12-04
Anonymous
No

Parsing

program.exe -n 1 -m 2

where n and m are integer switches fails. To solve this replace the line

this.valuePattern = @")((?<value>.+))";

with

this.valuePattern = @")((?<value>\S+))";

in IntSwitch.initialise()

The same goes for enum switches. The solution here is to replace

this.valuePattern = @")((?:"")(?<value>.+)(?:"")|(?<value>\S+))";

with

this.valuePattern = @")((?:"")(?<value>[^""]+)(?:"")|(?<value>\S+))";

in EnumSwitch.initialise()

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.