Преглед на файлове

* 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 години
родител
ревизия
9cca873e54
променени са 1 файла, в които са добавени 3 реда и са изтрити 4 реда
  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