summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-16 09:49:13 +0000
committerrubidium <rubidium@openttd.org>2013-11-16 09:49:13 +0000
commitd7af679fd6811f2909ad574cd73d181d064ac7f3 (patch)
tree4ef17f869469732488beec1e7671ccfe996edf1d /src
parent18a3a569fb81f3d0b04e10ff35db6919a0285742 (diff)
downloadopenttd-d7af679fd6811f2909ad574cd73d181d064ac7f3.tar.xz
(svn r26006) -Fix [FS#5804]: Game script showing vehicle on a story book, then the vehicle being removed and eventually being replaced by a non-user vehicle (most likely smoke) causing an assertion to trigger
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt3
-rw-r--r--src/strings.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index adbb099fa..0ebfe9647 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -2890,6 +2890,9 @@ STR_NEWGRF_INVALID_CARGO_QUANTITY :{COMMA} of <inv
STR_NEWGRF_INVALID_ENGINE :<invalid vehicle model>
STR_NEWGRF_INVALID_INDUSTRYTYPE :<invalid industry>
+# Placeholders for other invalid stuff, e.g. vehicles that have gone (Game Script).
+STR_INVALID_VEHICLE :<invalid vehicle>
+
# NewGRF scanning window
STR_NEWGRF_SCAN_CAPTION :{WHITE}Scanning NewGRFs
STR_NEWGRF_SCAN_MESSAGE :{BLACK}Scanning NewGRFs. Depending on the amount this can take a while...
diff --git a/src/strings.cpp b/src/strings.cpp
index bf65faf8c..66919e38c 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1489,7 +1489,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
StringID str;
switch (v->type) {
- default: NOT_REACHED();
+ default: str = STR_INVALID_VEHICLE; break;
case VEH_TRAIN: str = STR_SV_TRAIN_NAME; break;
case VEH_ROAD: str = STR_SV_ROAD_VEHICLE_NAME; break;
case VEH_SHIP: str = STR_SV_SHIP_NAME; break;