Skip to content

Commit e3cf475

Browse files
committed
suggestion to improve the generator in case a parameter contains a '-', e.g. a file path
1 parent 7848bd8 commit e3cf475

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

generator/Delphi/src/generator.dpr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ begin
114114
J := 0;
115115
for I := 1 to ParamCount do
116116
begin
117-
if pos('--', ParamStr(I)) > 0 then
117+
if ParamStr(I).StartsWith('--') then
118118
begin
119119
FParams.Add(Copy(ParamStr(I), 3, ParamStr(I).Length));
120120
inc(J);
121121
end
122-
else if pos('-', ParamStr(I)) > 0 then
122+
else if ParamStr(I).StartsWith('-') then
123123
begin
124124
FParams.Add(Copy(ParamStr(I), 2, ParamStr(I).Length));
125125
inc(J);

0 commit comments

Comments
 (0)