Wrong parsing in TCustomApplication.CheckOptions
Original Reporter info from Mantis: chaosben
-
Reporter name: Benjamin Schwarze
Original Reporter info from Mantis: chaosben
- Reporter name: Benjamin Schwarze
Description:
If the options is as short option, line 498 in CustApp checks if the following ParamStr looks like another options. If not, it's assumed to be the value of the current option (HaveArg := true).
Imho thats wrong and has to be determined via the colon(s) because it makes it impossible to use a short option as flag followed by a non-option.
Example: test.exe -f foo bar
With CheckOptions('f', '') only "bar" will be available in "NonOpts" but "foo" is treated as value of "-f", ignoring that "f" in CheckOptions wasn't followed by one or two colons.
Mantis conversion info:
- Mantis ID: 25412
- OS: all
- OS Build: all
- Build: trunk
- Platform: all
- Fixed in version: 2.6.4
- Fixed in revision: 26853 (#ad7953a5)
- Monitored by: » crossbuilder (Burkhard Carstens)
- Target version: 3.0.0