1
0
Fork 0

Codefix dccc6185: Incorrect encoding of empty parameters in ScriptText.

pull/13951/head
frosch 2025-04-01 20:00:06 +02:00
parent 2ae84f3c9e
commit e9c78b4967
1 changed files with 3 additions and 1 deletions

View File

@ -277,7 +277,9 @@ void ScriptText::_GetEncodedText(std::back_insert_iterator<std::string> &output,
if (++count != cur_param.consumes) {
ScriptLog::Warning(fmt::format("{}({}): {{{}}} expects {} to be consumed, but {} consumes {}", name, param_count + 1, cur_param.cmd, cur_param.consumes - 1, GetGameStringName(ref->string), count - 1));
/* Fill missing params if needed. */
for (int i = count; i < cur_param.consumes; i++) fmt::format_to(output, ":0");
for (int i = count; i < cur_param.consumes; i++) {
Utf8Encode(output, SCC_RECORD_SEPARATOR);
}
}
skip_args(cur_param.consumes - 1);
break;