Browse Source

Fix: Close values in Jmp

Akeit0 1 year ago
parent
commit
09080c8dc3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Lua/Runtime/LuaVirtualMachine.cs

+ 1 - 1
src/Lua/Runtime/LuaVirtualMachine.cs

@@ -710,7 +710,7 @@ public static partial class LuaVirtualMachine
                             context.Pc += instruction.SBx;
                             if (iA != 0)
                             {
-                                context.State.CloseUpValues(context.Thread, iA - 1);
+                                context.State.CloseUpValues(context.Thread, frameBase + iA - 1);
                             }
 
                             continue;