From 8e84eaafcadc389b3da3960cc5c35ad7e764e5dc Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Fri, 26 Sep 2025 13:26:19 -0500 Subject: [PATCH] Keep track of loop variables as scoped locals --- libs/UIX.DecompXml/Decompiler.Script.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/UIX.DecompXml/Decompiler.Script.cs b/libs/UIX.DecompXml/Decompiler.Script.cs index 76bc119..154ff23 100644 --- a/libs/UIX.DecompXml/Decompiler.Script.cs +++ b/libs/UIX.DecompXml/Decompiler.Script.cs @@ -233,6 +233,8 @@ partial class Decompiler forEachBlockInfo2.Type = IrisExpression.ToSyntax(loopVariableType, _context); forEachBlockInfo2.Identifier = loopVariableSymbol; + scopedLocals[loopVariableSymbol] = loopVariableType; + stack.Push(IdentifierName(loopVariableSymbol)); break;