|
@@ -73,13 +73,16 @@ int64 StringParameters::GetInt64(WChar t
|
|
|
{
|
|
|
if (this->offset >= this->num_param) {
|
|
|
DEBUG(misc, 0, "Trying to read invalid string parameter");
|
|
|
return 0;
|
|
|
}
|
|
|
if (this->type != NULL) {
|
|
|
assert(this->type[this->offset] == 0 || this->type[this->offset] == type);
|
|
|
if (this->type[this->offset] != 0 && this->type[this->offset] != type) {
|
|
|
DEBUG(misc, 0, "Trying to read string parameter with wrong type");
|
|
|
return 0;
|
|
|
}
|
|
|
this->type[this->offset] = type;
|
|
|
}
|
|
|
return this->data[this->offset++];
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1412,14 +1415,15 @@ static char *FormatString(char *buff, co
|
|
|
* actually set the station name. */
|
|
|
if (indsp->station_name != STR_NULL && indsp->station_name != STR_UNDEFINED) {
|
|
|
str = indsp->station_name;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
int64 args_array[] = {STR_TOWN_NAME, st->town->index, st->index};
|
|
|
StringParameters tmp_params(args_array);
|
|
|
uint64 args_array[] = {STR_TOWN_NAME, st->town->index, st->index};
|
|
|
WChar types_array[] = {0, SCC_TOWN_NAME, SCC_NUM};
|
|
|
StringParameters tmp_params(args_array, 3, types_array);
|
|
|
buff = GetStringWithArgs(buff, str, &tmp_params, last);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
case SCC_TOWN_NAME: { // {TOWN}
|