1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

Change: [Script] Restore support of {RAW_STRING} in ScriptText

This commit is contained in:
glx22
2023-02-18 14:37:52 +01:00
committed by Loïc Guilloux
parent 991a797e09
commit 41b414bc1c

View File

@@ -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;