mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r1961) - Fix: [ 1158618 ] Segmentation fault when loading savegame, out of bounds array check.
This commit is contained in:
parent
9c7d3f7f67
commit
3e51317236
|
@ -2499,11 +2499,11 @@ static void UpdateStationRating(Station *st)
|
|||
}
|
||||
|
||||
{
|
||||
if (!IS_HUMAN_PLAYER(st->owner) && st->owner != OWNER_NONE)
|
||||
if (st->owner != OWNER_NONE && !IS_HUMAN_PLAYER(st->owner))
|
||||
rating += _rating_boost[_opt.diff.competitor_intelligence];
|
||||
}
|
||||
|
||||
if (st->owner < 8 && HASBIT(st->town->statues, st->owner))
|
||||
if (st->owner < MAX_PLAYERS && HASBIT(st->town->statues, st->owner))
|
||||
rating += 26;
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue