Changeset - r15899:3bbe04d427d2
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-08-22 16:47:26
rubidium@openttd.org
(svn r20593) -Fix: (rlongago, r20547): long ago the service interval was int16, after which is got converted to Date except in the order backup. Much later I copied the savegame snippets from a vehicle and applied that on the order backup. Presto, reading/writing 32 bits (of Date) into 16 bits of ancient style service interval. That would then "spoil" the name pointer and that eventually crashes OpenTTD as it's likely to be an invalid pointer.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/order_backup.h
Show inline comments
 
@@ -42,7 +42,7 @@ private:
 
	uint32 user;               ///< The user that requested the backup.
 
	TileIndex tile;            ///< Tile of the depot where the order was changed.
 
	GroupID group;             ///< The group the vehicle was part of.
 
	uint16 service_interval;   ///< The service interval of the vehicle.
 
	Date service_interval;     ///< The service interval of the vehicle.
 
	char *name;                ///< The custom name of the vehicle.
 

	
 
	const Vehicle *clone;      ///< Vehicle this vehicle was a clone of.
0 comments (0 inline, 0 general)