浏览代码

* Correct allocation size for IsHandled, index is 1-based

Michaël Van Canneyt 4 月之前
父节点
当前提交
6314d69c40
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/link.pas

+ 1 - 1
compiler/link.pas

@@ -1820,7 +1820,7 @@ Implementation
             hp:=TCmdStrListItem(hp.next);
           end;
         ScriptCount:=i;
-        SetLength(IsHandled,ScriptCount);
+        SetLength(IsHandled,ScriptCount+1); // 1-based index used.
       end;
 
     procedure TInternalLinker.ParseScript_PostCheck;