Group.getAt comparison updated (fixes #578)

This commit is contained in:
photonstorm 2014-03-15 23:53:05 +00:00
parent fc5504f8d8
commit fee4d36b91
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ Bug Fixes
* The Static, Kinematic and Dynamic consts that P2.Body uses were incorrect (fixes #563)
* Sprite.destroy would fail if it had an Arcade Physics body, now added.
* Group.getAt comparison updated (fixes #578)

View file

@ -258,7 +258,7 @@ Phaser.Group.prototype.addAt = function (child, index) {
*/
Phaser.Group.prototype.getAt = function (index) {
if (index < 0 || index > this.children.length)
if (index < 0 || index >= this.children.length)
{
return -1;
}