(svn r1961) - Fix: [ 1158618 ] Segmentation fault when loading savegame, out of bounds array check.
authorDarkvater
Tue, 08 Mar 2005 17:32:34 +0000
changeset 1457 ace44a69238d
parent 1456 bae3d282668f
child 1458 d4d918bdb74a
(svn r1961) - Fix: [ 1158618 ] Segmentation fault when loading savegame, out of bounds array check.
station_cmd.c
--- a/station_cmd.c	Tue Mar 08 17:28:41 2005 +0000
+++ b/station_cmd.c	Tue Mar 08 17:32:34 2005 +0000
@@ -2499,11 +2499,11 @@
 			}
 
 			{
-				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;
 
 			{