1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 03:42:41 +01:00

Fix #14973: Incorrect colour for some composed strings.

This commit is contained in:
Peter Nelson
2025-12-25 04:29:58 +00:00
committed by Peter Nelson
parent c7f6971729
commit 8a4d60b812
3 changed files with 6 additions and 8 deletions

View File

@@ -268,9 +268,7 @@ std::optional<std::string> BuildCargoAcceptanceString(const CargoArray &acceptan
{
std::string_view list_separator = GetListSeparator();
/* Cargo acceptance is displayed in a extra multiline */
std::stringstream line;
line << GetString(label);
bool found = false;
for (const CargoSpec *cs : _sorted_cargo_specs) {
@@ -289,7 +287,7 @@ std::optional<std::string> BuildCargoAcceptanceString(const CargoArray &acceptan
}
}
if (found) return line.str();
if (found) return GetString(label, line.str());
return std::nullopt;
}