mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r21556) -Fix [FS#4320]: argt wasn't updated when argv was updated due to ARG_INDEX, so there was a mismatch between argt's offset and argv's offset causing trouble when getting the gender of a string
This commit is contained in:
parent
e1d62dc81b
commit
ee87c91e05
|
@ -940,9 +940,12 @@ static char *FormatString(char *buff, const char *str, int64 *argv, const int64
|
|||
buff = FormatCommaNumber(buff, GetInt64(&argv, argve, &argt, SCC_COMMA), last);
|
||||
break;
|
||||
|
||||
case SCC_ARG_INDEX: // Move argument pointer
|
||||
argv = argv_orig + (byte)*str++;
|
||||
case SCC_ARG_INDEX: { // Move argument pointer
|
||||
byte offset = (byte)*str++;
|
||||
argv = argv_orig + offset;
|
||||
if (argt_orig != NULL) argt = argt_orig + offset;
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_PLURAL_LIST: { // {P}
|
||||
int plural_form = *str++; // contains the plural form for this string
|
||||
|
|
Loading…
Reference in New Issue