- Fixed a possible NPE in checkRemoveCounterCost.

This commit is contained in:
Sloth
2012-04-21 21:16:37 +00:00
parent 00e56cef46
commit 88eef267a3

View File

@@ -188,7 +188,7 @@ public class CostUtil {
if (amount == null) {
amount = currentNum;
}
final double chance = percent * (currentNum / part.convertAmount());
final double chance = percent * (currentNum / amount);
if (chance <= CostUtil.r.nextFloat()) {
return false;
}