Changeset - r64:7b885d8ae65b
[Not reviewed]
master
0 2 0
darkvater - 20 years ago 2004-08-16 13:54:37
darkvater@openttd.org
(svn r65) -Fix [1009567] problem with transferred cargo crashes game. Invalid st->xy on deleted station.
2 files changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
lang/english.txt
Show inline comments
 
@@ -2179,6 +2179,7 @@ STR_SERVICE_NON_STOP_AT_TRAIN_DEPOT		:Se
 
STR_HEADING_FOR_TRAIN_DEPOT				:{LTBLUE}Heading for {TOWN} Train Depot
 
STR_HEADING_FOR_TRAIN_DEPOT_VEL			:{LTBLUE}Heading for {TOWN} Train Depot, {VELOCITY}
 

	
 
STR_UNKNOWN_DESTINATION			:unknown destination
 
STR_8812_EMPTY							:{LTBLUE}Empty
 
STR_8813_FROM							:{LTBLUE}{CARGO} from {STATION}
 
STR_8814_TRAIN_IS_WAITING_IN_DEPOT		:{WHITE}Train {COMMA16} is waiting in depot
strings.c
Show inline comments
 
@@ -496,7 +496,10 @@ static byte *DecodeString(byte *buff, co
 
			Station *st;
 
			InjectDparam(1);
 
			st = DEREF_STATION(GET_DPARAM16(1));
 
			assert(st->xy);
 
			if (!st->xy) { // station doesn't exist anymore
 
				buff = GetString(buff, STR_UNKNOWN_DESTINATION);
 
				break;
 
			}
 
			SET_DPARAM16(0, st->town->townnametype);
 
			SET_DPARAM32(1, st->town->townnameparts);
 
			buff = GetString(buff, st->string_id);
0 comments (0 inline, 0 general)