summaryrefslogtreecommitdiff
path: root/rtl
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-10-11 15:33:31 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-10-11 15:33:31 +0000
commitcc1900698b78b232d070fa22656ac27b314875de (patch)
treee8dcba834d524f52baa28d92f30fa33d610a37d8 /rtl
parentd717a0f9634ee1e69155da4b762ed77ba013f261 (diff)
downloadfpc-cc1900698b78b232d070fa22656ac27b314875de.tar.gz
# revisions: 45736
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/fixes_3_2@47093 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl')
-rw-r--r--rtl/inc/getopts.pp4
1 files changed, 2 insertions, 2 deletions
diff --git a/rtl/inc/getopts.pp b/rtl/inc/getopts.pp
index ecf3e43288..a466b32f43 100644
--- a/rtl/inc/getopts.pp
+++ b/rtl/inc/getopts.pp
@@ -460,8 +460,8 @@ begin
exit;
end;
Internal_getopt:=optstring[temp];
- if optstring[temp+1]=':' then
- if optstring[temp+2]=':' then
+ if (length(optstring)>temp) and (optstring[temp+1]=':') then
+ if (length(optstring)>temp+1) and (optstring[temp+2]=':') then
begin { optional argument }
if nextchar>0 then
begin