浏览代码

# revisions: 45736

git-svn-id: branches/fixes_3_2@47093 -
marco 4 年之前
父节点
当前提交
9d6e63f2e3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      rtl/inc/getopts.pp

+ 2 - 2
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