fixed some NPE's and other errors

This commit is contained in:
BetaSteward 2012-02-23 15:26:57 -05:00
parent c2df049383
commit 68391a7522
12 changed files with 82 additions and 15 deletions

View file

@ -203,7 +203,9 @@ public class RateCard {
maxSingleCount = Math.max(maxSingleCount, typeCount);
}
}
return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]/*-DOUBLE_PENALTY[doubleCount]*/);
if (maxSingleCount > 5)
maxSingleCount = 5;
return 2 * converted + 3 * (10 - SINGLE_PENALTY[maxSingleCount]/*-DOUBLE_PENALTY[doubleCount]*/);
}
/**