mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-02 00:40:03 +02:00
+ Corrected check for required arg to long opt
This commit is contained in:
parent
44dfb357e3
commit
dec8380954
@ -407,7 +407,7 @@ begin
|
||||
If (P<Length(ShortOptions)) and (Shortoptions[P+1]=':') then
|
||||
begin
|
||||
// Required argument
|
||||
If ((P+1)<Length(ShortOptions)) and (Shortoptions[P+2]<>':') Then
|
||||
If ((P+1)=Length(ShortOptions)) or (Shortoptions[P+2]<>':') Then
|
||||
If (J<L) or not haveArg then // Must be last in multi-opt !!
|
||||
Result:=Format(SErrOptionNeeded,[I,O[J]]);
|
||||
O:=O[j]; // O is added to arguments.
|
||||
|
Loading…
Reference in New Issue
Block a user