Browse Source

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

Michaël Van Canneyt 4 months ago
parent
commit
6314d69c40
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/link.pas

+ 1 - 1
compiler/link.pas

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