From 9cca873e541146ad2c944481496a0343a49521b1 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 10 Sep 2016 19:43:17 +0000 Subject: [PATCH] * Applied patch by accorp to fix unwanted parameter values in Opts output parameter of CheckOptions. (bug ID 29951) git-svn-id: trunk@34500 - --- packages/fcl-base/src/custapp.pp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/fcl-base/src/custapp.pp b/packages/fcl-base/src/custapp.pp index 2bf2ece974..0f722d9a3a 100644 --- a/packages/fcl-base/src/custapp.pp +++ b/packages/fcl-base/src/custapp.pp @@ -643,8 +643,6 @@ begin begin HaveArg:=(I0) 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