Codechange: use StringParameters for remapping the NewGRF string control codes

This commit is contained in:
Rubidium
2023-06-13 15:55:46 +02:00
committed by rubidium42
parent 1146904d45
commit aba0d27a28
5 changed files with 38 additions and 24 deletions

View File

@@ -868,8 +868,8 @@ static void FormatString(StringBuilder &builder, const char *str_arg, StringPara
if (SCC_NEWGRF_FIRST <= b && b <= SCC_NEWGRF_LAST) {
/* We need to pass some stuff as it might be modified. */
//todo: should argve be passed here too?
b = RemapNewGRFStringControlCode(b, &str, (int64 *)args->GetDataPointer(), args->GetDataLeft(), dry_run);
StringParameters remaining = args->GetRemainingParameters();
b = RemapNewGRFStringControlCode(b, &str, remaining, dry_run);
if (b == 0) continue;
}