aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-04-02 23:59:38 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-04-02 23:59:38 +0200
commit21fcf7c8744260c904e7040bdb1d550a0931aa3e (patch)
treebfc830fda9216a7db4be0f9ccf671db4a62343f6 /src
parentbb72ff9c35499078ef5ce22e905ddf919bcc531c (diff)
fix vet scope bug skipping some scopes
Fixes #3146
Diffstat (limited to 'src')
-rw-r--r--src/checker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 100b53315..7e653ffe6 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -224,7 +224,7 @@ gb_internal Scope *create_scope(CheckerInfo *info, Scope *parent) {
if (parent != nullptr && parent != builtin_pkg->scope) {
Scope *prev_head_child = parent->head_child.exchange(s, std::memory_order_acq_rel);
if (prev_head_child) {
- prev_head_child->next.store(s, std::memory_order_release);
+ s->next.store(prev_head_child, std::memory_order_release);
}
}