Browse Source

Pass Coroutine tests

Fix Coroutine tests
moogle 8 months ago
parent
commit
5ca7633cf7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Lua/LuaTable.cs

+ 2 - 1
src/Lua/LuaTable.cs

@@ -50,8 +50,9 @@ public sealed class LuaTable
 
                 if (MathEx.IsInteger(d))
                 {
+                    const int maxArraySize = 0x0f4240;
                     var index = (int)d;
-                    if (0 < index && index <= 0xf00 && index <= Math.Max(array.Length * 2, 8))
+                    if (0 < index && index < maxArraySize && index <= Math.Max(array.Length * 2, 8))
                     {
                         if (array.Length < index)
                             EnsureArrayCapacity(index);