Skip to content

Commit

Permalink
Fixed an issue with sparse arrays when shortening the array where the…
Browse files Browse the repository at this point in the history
… collection of keys is modified while removing keys.
  • Loading branch information
otac0n committed Jul 9, 2011
1 parent 1970e94 commit f5f6e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/IronJS.Runtime/Objects/ArrayObject.cs
Expand Up @@ -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);
Expand Down

0 comments on commit f5f6e96

Please sign in to comment.