Browse Source

Fixed an indexing bug introduced by the last change.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7169 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
PSp..om 14 years ago
parent
commit
70c1db322f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      engine/src/core/com/jme3/scene/Node.java

+ 1 - 1
engine/src/core/com/jme3/scene/Node.java

@@ -153,7 +153,7 @@ public class Node extends Spatial implements Savable {
         // FIXME: Iterating through the children list backwards
         // FIXME: Iterating through the children list backwards
         // to avoid IndexOutOfBoundsException. This is sometimes unreliable,
         // to avoid IndexOutOfBoundsException. This is sometimes unreliable,
         // a more robust solution is needed.
         // a more robust solution is needed.
-        for (int i = children.size(); i >= 0; i--){
+        for (int i = children.size()-1; i >= 0; i--){
             Spatial child = children.get(i);
             Spatial child = children.get(i);
             child.updateLogicalState(tpf);
             child.updateLogicalState(tpf);
         }
         }