Browse Source

Optimize: settable with metatable

Akeit0 11 months ago
parent
commit
0ddde886ac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Lua/Runtime/LuaVirtualMachine.cs

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

@@ -1404,7 +1404,7 @@ public static partial class LuaVirtualMachine
                 skip = false;
                 if (!Unsafe.IsNullRef(ref valueRef) && valueRef.Type != LuaValueType.Nil)
                 {
-                    luaTable[key] = value;
+                    valueRef = value;
                     return true;
                 }