Fix possible error in rare cases in LuaTable:
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
This commit is contained in:
@@ -720,7 +720,7 @@ public class LuaTable extends LuaValue implements Metatable {
|
|||||||
StrongSlot entry = slot.first();
|
StrongSlot entry = slot.first();
|
||||||
if (entry != null)
|
if (entry != null)
|
||||||
newArray[ k - 1 ] = entry.value();
|
newArray[ k - 1 ] = entry.value();
|
||||||
} else {
|
} else if ( !(slot instanceof DeadSlot) ) {
|
||||||
int j = slot.keyindex( newHashMask );
|
int j = slot.keyindex( newHashMask );
|
||||||
newHash[j] = slot.relink( newHash[j] );
|
newHash[j] = slot.relink( newHash[j] );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user