# HG changeset patch # User peter1138 # Date 2005-11-09 09:16:08 # Node ID 7b1966fd180dbf1ead01a4e646395ce8f0ed9c3f # Parent 14b1b02e278729dcaa2a8fa52f5b79ad88b652b9 (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) diff --git a/openttd.c b/openttd.c --- 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); }