1
0
Fork 0

Codefix dccc6185: Incorrect encoding of empty parameters in ScriptText. (#13951)

pull/13959/head
frosch 2025-04-03 13:57:30 +02:00 committed by GitHub
parent 061b5630ee
commit 86bb30acbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;