Explorar el Código

+ Corrected check for required arg to long opt

michael hace 22 años
padre
commit
dec8380954
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      fcl/inc/custapp.pp

+ 1 - 1
fcl/inc/custapp.pp

@@ -407,7 +407,7 @@ begin
               If (P<Length(ShortOptions)) and (Shortoptions[P+1]=':') then
               If (P<Length(ShortOptions)) and (Shortoptions[P+1]=':') then
                 begin
                 begin
                 // Required argument
                 // 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 !!
                   If (J<L) or not haveArg then // Must be last in multi-opt !!
                     Result:=Format(SErrOptionNeeded,[I,O[J]]);
                     Result:=Format(SErrOptionNeeded,[I,O[J]]);
                 O:=O[j]; // O is added to arguments.  
                 O:=O[j]; // O is added to arguments.