mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 17:48:46 +02:00
* fix for mantis #37233 crash in getopts.getlongopts with empty shortopts argument
git-svn-id: trunk@45683 -
This commit is contained in:
parent
f94518a9ae
commit
41406d161c
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user