summaryrefslogtreecommitdiff
path: root/openttd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-11-09 09:16:08 +0000
committerpeter1138 <peter1138@openttd.org>2005-11-09 09:16:08 +0000
commitd6e462dfca2202a5d4df83f06d4644ba949afda9 (patch)
tree391936ddebd5bff8271d6079e676e8c8a41515db /openttd.c
parent7ba8da9dc7001fe7e61d5c6757193ff13b356da7 (diff)
downloadopenttd-d6e462dfca2202a5d4df83f06d4644ba949afda9.tar.xz
(svn r3158) - PBS: [ 1252192 ] Fix an assertion failure due to possible junk data in pre-PBS savegames. This will not correct pre-PBS savegames loaded and saved since PBS was introduced. (thanks glx)
Diffstat (limited to 'openttd.c')
-rw-r--r--openttd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openttd.c b/openttd.c
index 1229b24f9..c591e259e 100644
--- a/openttd.c
+++ b/openttd.c
@@ -1277,6 +1277,9 @@ bool AfterLoadGame(uint version)
CLRBIT(_m[tile].m4, 2);
SETBIT(_m[tile].m4, 3);
}
+ // Clear possible junk data in PBS bits.
+ if (IsTileType(tile, MP_RAILWAY) && !HASBIT(_m[tile].m5, 7))
+ SB(_m[tile].m4, 4, 4, 0);
} END_TILE_LOOP(tile, MapSizeX(), MapSizeY(), 0);
}