summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2020-06-21 23:47:45 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2020-06-22 08:02:42 +0200
commite6f3e15c32b51f4cc430a9bc9d0b1fc708135a77 (patch)
tree28412c4ea117db8cde540594d39ed96cc706ba59
parent1ac0d4a5b2c8f5e5c9a4629091c81e3f41a4c126 (diff)
downloadopenttd-e6f3e15c32b51f4cc430a9bc9d0b1fc708135a77.tar.xz
Fix 63ccb36e: Incorrect string type for OrderBackup::name save/load
In 63ccb36e BaseConsist::name was changed from a malloced char* to a std::string. OrderBackup inherits from BaseConsist. The saveload of OrderBackup::name was not updated.
-rw-r--r--src/saveload/order_sl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp
index c8747d36b..1292c1b05 100644
--- a/src/saveload/order_sl.cpp
+++ b/src/saveload/order_sl.cpp
@@ -241,7 +241,7 @@ const SaveLoad *GetOrderBackupDescription()
SLE_VAR(OrderBackup, group, SLE_UINT16),
SLE_CONDVAR(OrderBackup, service_interval, SLE_FILE_U32 | SLE_VAR_U16, SL_MIN_VERSION, SLV_192),
SLE_CONDVAR(OrderBackup, service_interval, SLE_UINT16, SLV_192, SL_MAX_VERSION),
- SLE_STR(OrderBackup, name, SLE_STR, 0),
+ SLE_SSTR(OrderBackup, name, SLE_STR),
SLE_CONDNULL(2, SL_MIN_VERSION, SLV_192), // clone (2 bytes of pointer, i.e. garbage)
SLE_CONDREF(OrderBackup, clone, REF_VEHICLE, SLV_192, SL_MAX_VERSION),
SLE_VAR(OrderBackup, cur_real_order_index, SLE_UINT8),