summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-11-12 20:05:12 +0000
committerrubidium <rubidium@openttd.org>2007-11-12 20:05:12 +0000
commiteb47b106acc45bf4272148df2e4388bebeda29b1 (patch)
tree3c70d17fccc565ff939c181daad8ad873dab3ec6
parent8752519896f4cf0a164fcc4ec590f4090311f611 (diff)
downloadopenttd-eb47b106acc45bf4272148df2e4388bebeda29b1.tar.xz
(svn r11422) -Fix [FS#1430]: properly support genders coming from newgrfs instead of crashing.
-rw-r--r--src/strings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 8db726215..09a9ccc44 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -691,7 +691,8 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
}
case SCC_GENDER_LIST: { // {G 0 Der Die Das}
- const char* s = GetStringPtr(argv_orig[(byte)*str++]); // contains the string that determines gender.
+ char buffr[512];
+ const char *s = GetStringWithArgs(buffr, argv_orig[(byte)*str++], argv, last); // contains the string that determines gender.
int len;
int gender = 0;
if (s != NULL) {