From 69667baafb8f3e33fb315435c63b8732e4692786 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 10 Oct 2015 04:38:37 -0400 Subject: [PATCH] v0.3.2: fixed a concurrent modification exception in distortion traps --- .../shatteredpixeldungeon/levels/traps/DistortionTrap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java index c47d312d1..b3c4fad5b 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/traps/DistortionTrap.java @@ -39,7 +39,7 @@ public class DistortionTrap extends Trap{ @Override public void activate() { InterlevelScene.returnDepth = Dungeon.depth; - for (Item item : Dungeon.hero.belongings.backpack.items){ + for (Item item : Dungeon.hero.belongings.backpack.items.toArray( new Item[0])){ if (item instanceof Key && ((Key)item).depth == Dungeon.depth){ item.detachAll(Dungeon.hero.belongings.backpack); }