diff --git a/README.md b/README.md index a03fa70ef..d9c9582fd 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/src/core/Group.js b/src/core/Group.js index 5de59fe1d..1acdc9747 100644 --- a/src/core/Group.js +++ b/src/core/Group.js @@ -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; }