From f5f6e96c625358d278b09e72668efa34e5b25b40 Mon Sep 17 00:00:00 2001 From: John Gietzen Date: Fri, 8 Jul 2011 22:30:35 -0500 Subject: [PATCH] Fixed an issue with sparse arrays when shortening the array where the collection of keys is modified while removing keys. --- Src/IronJS.Runtime/Objects/ArrayObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/IronJS.Runtime/Objects/ArrayObject.cs b/Src/IronJS.Runtime/Objects/ArrayObject.cs index aaa38d42..3d75fd81 100644 --- a/Src/IronJS.Runtime/Objects/ArrayObject.cs +++ b/Src/IronJS.Runtime/Objects/ArrayObject.cs @@ -438,7 +438,7 @@ public void PutLength(uint newLength, uint length) return; } - foreach (var key in this.storage.Keys) + foreach (var key in this.storage.Keys.ToList()) { if (key >= newLength) this.storage.Remove(key);