mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-21 08:09:22 +02:00
Make sure that we do not read passed the end of OPTSTRING variable
git-svn-id: trunk@45736 -
This commit is contained in:
parent
3655c46982
commit
60c187e169
@ -460,8 +460,8 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
Internal_getopt:=optstring[temp];
|
Internal_getopt:=optstring[temp];
|
||||||
if optstring[temp+1]=':' then
|
if (length(optstring)>temp) and (optstring[temp+1]=':') then
|
||||||
if optstring[temp+2]=':' then
|
if (length(optstring)>temp+1) and (optstring[temp+2]=':') then
|
||||||
begin { optional argument }
|
begin { optional argument }
|
||||||
if nextchar>0 then
|
if nextchar>0 then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user