v2.4.1: fixed saves from prior to v2.4 not resetting generators

This commit is contained in:
Evan Debenham
2024-05-16 14:37:37 -04:00
parent c9c6380349
commit 862b152caa

View File

@@ -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]);
}
}
}