From 2af7f9a3a2503f9acea988e38c76a6665c44d9cf Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 19 Jun 2018 21:03:45 -0400 Subject: [PATCH] v0.7.0: made painter code more resilient to the room list changing --- .../shatteredpixeldungeon/levels/painters/RegularPainter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java index d5f636334..a7e67d352 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java @@ -109,7 +109,7 @@ public abstract class RegularPainter extends Painter { Random.shuffle(rooms); - for (Room r : rooms) { + for (Room r : rooms.toArray(new Room[0])) { placeDoors( r ); r.paint( level ); }