summaryrefslogtreecommitdiff
path: root/src/townname.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/townname.cpp')
-rw-r--r--src/townname.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/townname.cpp b/src/townname.cpp
index ecee3e0a0..042ede98d 100644
--- a/src/townname.cpp
+++ b/src/townname.cpp
@@ -49,8 +49,9 @@ TownNameParams::TownNameParams(const Town *t) :
char *GetTownName(char *buff, const TownNameParams *par, uint32 townnameparts, const char *last)
{
if (par->grfid == 0) {
- int64 args[1] = { townnameparts };
- return GetStringWithArgs(buff, par->type, args, endof(args), last);
+ int64 args_array[1] = { townnameparts };
+ StringParameters tmp_params(args_array);
+ return GetStringWithArgs(buff, par->type, &tmp_params, last);
}
return GRFTownNameGenerate(buff, par->grfid, par->type, townnameparts, last);