v0.6.1: fixed a crash bug with Random.chances( hashmap )

This commit is contained in:
Evan Debenham 2017-06-13 17:27:56 -04:00
parent 49543e301c
commit 096d453cbb

View File

@ -121,6 +121,10 @@ public class Random {
sum += probs[i];
}
if (sum <= 0) {
return null;
}
float value = Float( sum );
sum = probs[0];