summaryrefslogtreecommitdiff
path: root/src/order_backup.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-22 16:47:26 +0000
committerrubidium <rubidium@openttd.org>2010-08-22 16:47:26 +0000
commit1fd36a0f3249e762ea426be2bd5b508c95598801 (patch)
treedc4b77e35bd8ae080e9fb8dd8bdc7e7ddcec0fc2 /src/order_backup.h
parent29e02728e112d579256dc414bdef5be0325e1a25 (diff)
downloadopenttd-1fd36a0f3249e762ea426be2bd5b508c95598801.tar.xz
(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.
Diffstat (limited to 'src/order_backup.h')
-rw-r--r--src/order_backup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_backup.h b/src/order_backup.h
index 4fa42b326..15a9d0bc1 100644
--- a/src/order_backup.h
+++ b/src/order_backup.h
@@ -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.