From f8b2091aed6ca42a0cf1fa7b6a920f6c3a5227a9 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 27 Mar 2025 19:04:28 +0100 Subject: Fix refcount bug with indexing for nested arrays --- src/Compile.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Compile.hs') diff --git a/src/Compile.hs b/src/Compile.hs index 2652ed4..6e46f74 100644 --- a/src/Compile.hs +++ b/src/Compile.hs @@ -831,6 +831,7 @@ compile' env = \case resname <- genName' "ixres" emit $ SVarDecl True (repSTy t) resname (CEIndex (CELit (arrname ++ ".buf->xs")) (toLinearIdx n arrname idxname)) + incrementVarAlways "idxelt" Increment t resname incrementVarAlways "idx" Decrement (STArr n t) arrname return (CELit resname) -- cgit v1.2.3-70-g09d2