summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openttd.c2
-rw-r--r--players.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/openttd.c b/openttd.c
index 33e1018af..f6f3a61f6 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1283,7 +1283,7 @@ bool AfterLoadGame(uint version)
if (version < 0x1000) {
int i;
FOR_ALL_PLAYERS(p) {
- for (i = 0; i < 256; i++) {
+ for (i = 0; i < TOTAL_NUM_ENGINES; i++) {
p->engine_replacement[i] = INVALID_ENGINE;
}
p->engine_renew = false;
diff --git a/players.c b/players.c
index 257db5b9e..57f4b17bf 100644
--- a/players.c
+++ b/players.c
@@ -494,7 +494,7 @@ Player *DoStartupNewPlayer(bool is_ai)
p->face = Random();
/* Engine renewal settings */
- for (i = 0; i < 256; i++)
+ for (i = 0; i < TOTAL_NUM_ENGINES; i++)
p->engine_replacement[i] = INVALID_ENGINE;
p->engine_renew = false;