ArrayUtils.AddAt didn't calculate the array offset correctly if you passed an array in to be merged with an existing array. This also caused Container.addAt to fail if an array was passed to it. Fix #3788

This commit is contained in:
Richard Davey 2018-06-27 11:31:51 +01:00
parent 6cc7939870
commit da2b91b460
2 changed files with 3 additions and 2 deletions

View file

@ -58,7 +58,8 @@
* `GameObject.disableInteractive` was toggling input. Every second call would turn the input back on (thanks @TadejZupancic)
* The position of the TilemapLayer wasn't taken into account when culling tiles for the Camera. It's now calculated as part of the cull flow (thanks @Upperfoot)
* Fix extra argument passing in Array.Each (thanks @samme)
* TileSprite was using the Size compontent instead of ComputedSize, meaning its `getBounds` and `displayWidth` and `displayHeight` results were incorrect. Fix #3789 (thanks @jjalonso)
* TileSprite was using the Size compontent instead of ComputedSize, meaning its `getBounds` and `displayWidth` and `displayHeight` results were incorrect. Fix #3789 (thanks @jjalonso)
* ArrayUtils.AddAt didn't calculate the array offset correctly if you passed an array in to be merged with an existing array. This also caused Container.addAt to fail if an array was passed to it. Fix #3788 (thanks @jjalonso)
### Examples, Documentation and TypeScript

View file

@ -98,7 +98,7 @@ var AddAt = function (array, item, index, limit, callback, context)
itemLength = remaining;
}
for (var i = itemLength; i > 0; i--)
for (var i = itemLength - 1; i >= 0; i--)
{
var entry = item[i];