* fix for mantis #37233 crash in getopts.getlongopts with empty shortopts argument

git-svn-id: trunk@45683 -
This commit is contained in:
marco 2020-06-23 09:01:37 +00:00
parent f94518a9ae
commit 41406d161c

View File

@ -220,7 +220,9 @@ begin
Last_nonopt:=1;
OptOpt:='?';
Nextchar:=0;
case opts[1] of
ordering:=permute;
if length(opts)>0 then
case opts[1] of
'-' : begin
ordering:=return_in_order;
delete(opts,1,1);
@ -230,7 +232,7 @@ begin
delete(opts,1,1);
end;
else
ordering:=permute;
ordering:=permute;
end;
end;