Changeset - r26938:599b41e0c2f0
[Not reviewed]
master
0 1 0
glx22 - 16 months ago 2023-02-18 13:37:52
glx@openttd.org
Change: [Script] Restore support of {RAW_STRING} in ScriptText
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/strings.cpp
Show inline comments
 
@@ -926,8 +926,9 @@ static char *FormatString(char *buff, co
 

	
 
						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, co
 
				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;
0 comments (0 inline, 0 general)