newgrf_text.c
changeset 4915 b3b625640fa6
parent 4912 d04b3f2bca70
child 4992 6d0a80c5c654
--- a/newgrf_text.c	Sat Oct 21 23:36:43 2006 +0000
+++ b/newgrf_text.c	Sat Oct 21 23:51:02 2006 +0000
@@ -305,7 +305,7 @@
 	/*Search the list of lang-strings of this stringid for current lang */
 	for (search_text = _grf_text[stringid].textholder; search_text != NULL; search_text = search_text->next) {
 		if (search_text->langid == _currentLangID) {
-			return strecpy(buff, search_text->text, NULL);
+			return strecpy(buff, search_text->text, last);
 		}
 
 		/* If the current string is English or American, set it as the
@@ -316,7 +316,7 @@
 	}
 
 	/* If there is a fallback string, return that */
-	if (default_text != NULL) return strecpy(buff, default_text->text, NULL);
+	if (default_text != NULL) return strecpy(buff, default_text->text, last);
 
 	/* Use the default string ID if the fallback string isn't available */
 	return GetString(buff, _grf_text[stringid].def_string, last);