mirror of https://github.com/FreeCol/freecol.git
This fixes BR#3310 Hangs on end turn uc.probability is zero.
This commit is contained in:
parent
fc293ffcd6
commit
317861fcb8
|
@ -999,7 +999,8 @@ public class ServerUnit extends Unit implements TurnTaker {
|
|||
&& (produce = getWorkType()) != null
|
||||
&& (learn = spec.getExpertForProducing(produce)) != null
|
||||
&& learn != getType()
|
||||
&& (uc = getUnitChange(UnitChangeType.EXPERIENCE,learn)) != null) {
|
||||
&& (uc = getUnitChange(UnitChangeType.EXPERIENCE,learn)) != null
|
||||
&& uc.probability > 0) {
|
||||
int maximumExperience = getType().getMaximumExperience();
|
||||
int maxValue = (100 * maximumExperience) / uc.probability;
|
||||
if (maxValue > 0
|
||||
|
|
Loading…
Reference in New Issue