Browse Source

* Applied patch by accorp to fix unwanted parameter values in Opts output parameter of CheckOptions. (bug ID 29951)

git-svn-id: trunk@34500 -
michael 9 years ago
parent
commit
9cca873e54
1 changed files with 3 additions and 4 deletions
  1. 3 4
      packages/fcl-base/src/custapp.pp

+ 3 - 4
packages/fcl-base/src/custapp.pp

@@ -643,8 +643,6 @@ begin
           begin
           HaveArg:=(I<ParamCount) and (Length(ParamStr(I+1))>0) and (ParamStr(I+1)[1]<>FOptionChar);
           UsedArg:=False;
-          If HaveArg then
-            OV:=Paramstr(I+1);
           If Not CaseSensitiveOptions then
             O:=LowerCase(O);
           L:=Length(O);
@@ -668,10 +666,11 @@ begin
               end;
             Inc(J);
             end;
-          If HaveArg and UsedArg then
+          HaveArg:=HaveArg and UsedArg;
+          If HaveArg then
             begin
             Inc(I); // Skip argument.
-            O:=O[Length(O)]; // O is added to arguments !
+            OV:=Paramstr(I);
             end;
           end;
         If HaveArg and ((Result='') or AllErrors) then