* Fix bug ID #31695

git-svn-id: trunk@35893 -
This commit is contained in:
michael 2017-04-22 11:08:03 +00:00
parent 5cd12a2521
commit b6123bb1a8

View File

@ -648,15 +648,15 @@ begin
J:=2; J:=2;
While ((Result='') or AllErrors) and (J<=L) do While ((Result='') or AllErrors) and (J<=L) do
begin begin
P:=Pos(O[J],ShortOptions); P:=Pos(O[J],SO);
If (P=0) or (O[j]=':') then If (P=0) or (O[j]=':') then
AddToResult(Format(SErrInvalidOption,[I,O[J]])) AddToResult(Format(SErrInvalidOption,[I,O[J]]))
else else
begin begin
If (P<Length(ShortOptions)) and (Shortoptions[P+1]=':') then If (P<Length(SO)) and (SO[P+1]=':') then
begin begin
// Required argument // Required argument
If ((P+1)=Length(ShortOptions)) or (Shortoptions[P+2]<>':') Then If ((P+1)=Length(SO)) or (SO[P+2]<>':') Then
If (J<L) or not haveArg then // Must be last in multi-opt !! If (J<L) or not haveArg then // Must be last in multi-opt !!
AddToResult(Format(SErrOptionNeeded,[I,O[J]])); AddToResult(Format(SErrOptionNeeded,[I,O[J]]));
O:=O[j]; // O is added to arguments. O:=O[j]; // O is added to arguments.