Commits

Peter Hosey committed 630f2a7

Fixed removing peers: Don't advance the index when we delete a peer from the array.

Comments (0)

Files changed (1)

     }
   }
 
-  for (int i = 0; i < peers.size(); i++)
+  for (int i = 0; i < peers.size(); )
   {
     Peer p = (Peer)peers.get(i);
     p.moveSelf();
     if (p.removing > 1)
     {
       peers.remove(i);
+    } else {
+    	++i;
     }
   }