From 55ad1028fc38f9cf0c1b1de7b98bf8a5d5b7f0d3 Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Sun, 21 Mar 2021 02:31:32 +0200 Subject: [PATCH] Fixed crash in analysis of variable declaration aliases --- src/analysis.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analysis.zig b/src/analysis.zig index dc3dcb7..3f8a2d0 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -325,7 +325,7 @@ fn resolveVarDeclAliasInternal( else => return null, }; - if (!isContainer(node_tags[resolved_node])) return null; + if (resolved_node >= node_tags.len or !isContainer(node_tags[resolved_node])) return null; break :block NodeWithHandle{ .node = resolved_node, .handle = resolved.handle }; } else return null;