Don't destructively modify the array given us by usercode.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@469 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Ray Greenwell
2007-10-24 21:52:18 +00:00
parent 9402b71765
commit 00723e90bf
@@ -915,9 +915,7 @@ public class GameControlBackend
protected function toTypedIntArray (array :Array) :TypedArray protected function toTypedIntArray (array :Array) :TypedArray
{ {
var tarray :TypedArray = TypedArray.create(int); var tarray :TypedArray = TypedArray.create(int);
while (array.length > 0) { tarray.addAll(array);
tarray.push(int(array.shift()));
}
return tarray; return tarray;
} }