diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index 3ef7a6a77..ed4c8a554 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -893,8 +893,10 @@ public class Generator { if (bundle.contains(GENERAL_PROBS)){ float[] probs = bundle.getFloatArray(GENERAL_PROBS); - for (int i = 0; i < probs.length; i++){ - categoryProbs.put(Category.values()[i], probs[i]); + if (probs.length == Category.values().length) { + for (int i = 0; i < probs.length; i++) { + categoryProbs.put(Category.values()[i], probs[i]); + } } }