summary refs log tree commit diff stats
path: root/compiler/ic/ic.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2023-11-22 09:58:17 +0100
committerGitHub <noreply@github.com>2023-11-22 09:58:17 +0100
commitce1a5cb165570547c0c687c6ba0add19a8579721 (patch)
treece21c56438ca05aa6b5c2e585b6162ff79612667 /compiler/ic/ic.nim
parenteba87c7e972db4f992fdad5f825ac6940ba4a7e1 (diff)
downloadNim-ce1a5cb165570547c0c687c6ba0add19a8579721.tar.gz
progress: 'm' command line switch (#22976)
Diffstat (limited to 'compiler/ic/ic.nim')
-rw-r--r--compiler/ic/ic.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ic/ic.nim b/compiler/ic/ic.nim
index b244d7afb..867bc95ae 100644
--- a/compiler/ic/ic.nim
+++ b/compiler/ic/ic.nim
@@ -944,6 +944,9 @@ proc loadSym(c: var PackedDecoder; g: var PackedModuleGraph; thisModule: int; s:
     result = nil
   else:
     let si = moduleIndex(c, g, thisModule, s)
+    if si >= g.len:
+      g.pm.setLen(si+1)
+
     if g[si].status == undefined and c.config.cmd == cmdM:
       var cachedModules: seq[FileIndex] = @[]
       discard needsRecompile(g, c.config, c.cache, FileIndex(si), cachedModules)