mirror of https://github.com/OpenTTD/OpenTTD.git
Change: [Script] Restore support of {RAW_STRING} in ScriptText
This commit is contained in:
parent
991a797e09
commit
41b414bc1c
|
@ -926,8 +926,9 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
|||
|
||||
sub_args.SetParam(i++, param);
|
||||
} else {
|
||||
s++; // skip the leading \"
|
||||
char *g = stredup(s);
|
||||
g[p - s] = '\0';
|
||||
g[p - s - 1] = '\0'; // skip the trailing \"
|
||||
|
||||
sub_args_need_free[i] = true;
|
||||
sub_args.SetParam(i++, (uint64)(size_t)g);
|
||||
|
@ -1044,7 +1045,6 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
|||
break;
|
||||
|
||||
case SCC_RAW_STRING_POINTER: { // {RAW_STRING}
|
||||
if (game_script) break;
|
||||
const char *raw_string = (const char *)(size_t)args->GetInt64(SCC_RAW_STRING_POINTER);
|
||||
buff = FormatString(buff, raw_string, args, last);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue