1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-17 03:29:09 +00:00

(svn r23804) -Fix: [NewGRF] Make string code 80 more secure by not crashing when it's used in strings where it's not supposed to be used

This commit is contained in:
yexo
2012-01-15 13:17:02 +00:00
parent 8e68a442b9
commit 15292fa080
2 changed files with 2 additions and 2 deletions

View File

@@ -838,7 +838,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
}
case SCC_NEWGRF_PRINT_WORD_STRING_ID: {
StringID substr = args->GetInt32(SCC_NEWGRF_PRINT_WORD_STRING_ID);
StringID substr = TTDPStringIDToOTTDStringIDMapping(args->GetInt32(SCC_NEWGRF_PRINT_WORD_STRING_ID));
str_stack.push(GetStringPtr(substr));
case_index = next_substr_case_index;
next_substr_case_index = 0;