From 77efdcd89911f1c9b831cfcf5e5aba49ec8d53d5 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Thu, 2 May 2024 19:23:17 +0200 Subject: fix packed gep loads with wrong alignment --- src/checker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/checker.cpp') diff --git a/src/checker.cpp b/src/checker.cpp index 047017290..70ca4fc47 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -4315,7 +4315,7 @@ gb_internal bool correct_single_type_alias(CheckerContext *c, Entity *e) { gb_internal bool correct_type_alias_in_scope_backwards(CheckerContext *c, Scope *s) { bool correction = false; - for (u32 n = s->elements.capacity, i = n-1; i < n; i--) { + for (u32 n = s->elements.count, i = n-1; i < n; i--) { auto const &entry = s->elements.entries[i]; Entity *e = entry.value; if (entry.hash && e != nullptr) { -- cgit v1.2.3