2
0
AnnulusGames 1 жил өмнө
parent
commit
961c216df7

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

@@ -1001,7 +1001,7 @@ public static partial class LuaVirtualMachine
             throw new LuaRuntimeException(GetTracebacks(state, chunk, pc), "table index is NaN");
         }
 
-        if (isTable && t.ContainsKey(key))
+        if (isTable)
         {
             t[key] = value;
             return new(1);
@@ -1028,11 +1028,6 @@ public static partial class LuaVirtualMachine
                 RootChunkName = rootChunk.Name,
             }, buffer, cancellationToken);
         }
-        else if (isTable)
-        {
-            t[key] = value;
-            return new(1);
-        }
         else
         {
             LuaRuntimeException.AttemptInvalidOperation(GetTracebacks(state, chunk, pc), "index", table);