diff --git a/src/bundler/linker_context/doStep5.zig b/src/bundler/linker_context/doStep5.zig index a1df034bac..a2c55e745e 100644 --- a/src/bundler/linker_context/doStep5.zig +++ b/src/bundler/linker_context/doStep5.zig @@ -7,7 +7,7 @@ pub fn doStep5(c: *LinkerContext, source_index_: Index, _: usize) void { defer trace.end(); const id = source_index; - if (id > c.graph.meta.len) return; + if (id >= c.graph.meta.len) return; const worker: *ThreadPool.Worker = ThreadPool.Worker.get(@fieldParentPtr("linker", c)); defer worker.unget(); diff --git a/src/install/postinstall_optimizer.zig b/src/install/postinstall_optimizer.zig index d2ed846fb8..588d60ca5b 100644 --- a/src/install/postinstall_optimizer.zig +++ b/src/install/postinstall_optimizer.zig @@ -59,7 +59,7 @@ pub const PostinstallOptimizer = enum { // Loop through the list of optional dependencies with platform-specific constraints // Find a matching target-specific dependency. for (resolutions) |resolution| { - if (resolution > metas.len) continue; + if (resolution >= metas.len) continue; const meta: *const Meta = &metas[resolution]; if (meta.arch == .all or meta.os == .all) continue; if (meta.arch.isMatch(target_cpu) and meta.os.isMatch(target_os)) {