Fixed crash in analysis of variable declaration aliases

This commit is contained in:
Alexandros Naskos 2021-03-21 02:31:32 +02:00
parent 3ad218b3ad
commit 55ad1028fc
No known key found for this signature in database
GPG Key ID: 02BF2E72B0EA32D2

View File

@ -325,7 +325,7 @@ fn resolveVarDeclAliasInternal(
else => return null, 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 }; break :block NodeWithHandle{ .node = resolved_node, .handle = resolved.handle };
} else return null; } else return null;