Skip to content

Commit bc70ce7

Browse files
committed
Minor logic fix to nested loop counters.
1 parent 52a39cd commit bc70ce7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/physics/arcade/World.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,9 @@ Phaser.Physics.Arcade.prototype = {
652652

653653
var len = group.children.length;
654654

655-
for (var i = 0; i < len; i++)
655+
for (var i = 0; i < len - 1; i++)
656656
{
657-
for (var j = i + 1; j <= len; j++)
657+
for (var j = i + 1; j < len; j++)
658658
{
659659
if (group.children[i] && group.children[j] && group.children[i].exists && group.children[j].exists)
660660
{

0 commit comments

Comments
 (0)