diff --git a/src/openrct2/localisation/Formatting.cpp b/src/openrct2/localisation/Formatting.cpp index 2417bb406e..6c64e6e9f6 100644 --- a/src/openrct2/localisation/Formatting.cpp +++ b/src/openrct2/localisation/Formatting.cpp @@ -680,15 +680,24 @@ namespace OpenRCT2 if (argIndex < args.size()) { const auto& arg = args[argIndex++]; - if (auto stringid = std::get_if(&arg)) + std::optional stringId; + if (auto value16 = std::get_if(&arg)) { - if (IsRealNameStringId(*stringid)) + stringId = *value16; + } + else if (auto value32 = std::get_if(&arg)) + { + stringId = *value32; + } + if (stringId) + { + if (IsRealNameStringId(*stringId)) { - FormatRealName(ss, *stringid); + FormatRealName(ss, *stringId); } else { - auto subfmt = GetFmtStringById(*stringid); + auto subfmt = GetFmtStringById(*stringId); FormatStringAny(ss, subfmt, args, argIndex); } }