summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-12 18:14:15 +0000
committerrubidium <rubidium@openttd.org>2011-08-12 18:14:15 +0000
commit14fae95134d036262a3e070913fa8ebf5af16254 (patch)
tree9646b167dde1d95d6a2ab6ef7cdf54eb6b3aa26d
parentfa4f6737d61c76b41f0f6bbddcb2dea33bc07a0b (diff)
downloadopenttd-14fae95134d036262a3e070913fa8ebf5af16254.tar.xz
(svn r22735) -Fix [FS#4718]: triggering NOT_REACHED when playing with a NewGRF that supplies genders/cases for a language that you removed from your installation
-rw-r--r--src/newgrf_text.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp
index 547c02dd3..fbe085c8e 100644
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -293,8 +293,9 @@ struct UnmappedChoiceList : ZeroedMemoryAllocator {
char *d = old_d;
if (lm == NULL && this->type != SCC_PLURAL_LIST) {
- NOT_REACHED();
- /* In case there is no mapping, just ignore everything but the default. */
+ /* In case there is no mapping, just ignore everything but the default.
+ * A probable cause for this happening is when the language file has
+ * been removed by the user and as such no mapping could be made. */
size_t len = strlen(this->strings[0]);
memcpy(d, this->strings[0], len);
return d + len;