From eb47b106acc45bf4272148df2e4388bebeda29b1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 12 Nov 2007 20:05:12 +0000 Subject: [PATCH] (svn r11422) -Fix [FS#1430]: properly support genders coming from newgrfs instead of crashing. --- src/strings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/strings.cpp b/src/strings.cpp index 8db7262153..09a9ccc446 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) {