From 81555a8ea40a52a8673edcc18c3fef444a9f6e33 Mon Sep 17 00:00:00 2001 From: Mikhail Redko Date: Mon, 4 Jan 2021 20:52:43 +0200 Subject: Core/Misc: Remove unneeded null-terminator after switch from wchar_t to std::wstring in 309851e. Fixes creation characters with declined russian names (#25797) Closes #23775 (cherry picked from commit eaa22b8a1722fd362bf5ef2c6944b5c50b121afd) --- src/common/Utilities/Util.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/common/Utilities/Util.cpp') diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp index ad98bd5e491..4406dc673e0 100644 --- a/src/common/Utilities/Util.cpp +++ b/src/common/Utilities/Util.cpp @@ -655,22 +655,22 @@ std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension) return wname; // Important: end length must be <= MAX_INTERNAL_PLAYER_NAME-MAX_PLAYER_NAME (3 currently) - static std::wstring const a_End = { wchar_t(0x0430), wchar_t(0x0000) }; - static std::wstring const o_End = { wchar_t(0x043E), wchar_t(0x0000) }; - static std::wstring const ya_End = { wchar_t(0x044F), wchar_t(0x0000) }; - static std::wstring const ie_End = { wchar_t(0x0435), wchar_t(0x0000) }; - static std::wstring const i_End = { wchar_t(0x0438), wchar_t(0x0000) }; - static std::wstring const yeru_End = { wchar_t(0x044B), wchar_t(0x0000) }; - static std::wstring const u_End = { wchar_t(0x0443), wchar_t(0x0000) }; - static std::wstring const yu_End = { wchar_t(0x044E), wchar_t(0x0000) }; - static std::wstring const oj_End = { wchar_t(0x043E), wchar_t(0x0439), wchar_t(0x0000) }; - static std::wstring const ie_j_End = { wchar_t(0x0435), wchar_t(0x0439), wchar_t(0x0000) }; - static std::wstring const io_j_End = { wchar_t(0x0451), wchar_t(0x0439), wchar_t(0x0000) }; - static std::wstring const o_m_End = { wchar_t(0x043E), wchar_t(0x043C), wchar_t(0x0000) }; - static std::wstring const io_m_End = { wchar_t(0x0451), wchar_t(0x043C), wchar_t(0x0000) }; - static std::wstring const ie_m_End = { wchar_t(0x0435), wchar_t(0x043C), wchar_t(0x0000) }; - static std::wstring const soft_End = { wchar_t(0x044C), wchar_t(0x0000) }; - static std::wstring const j_End = { wchar_t(0x0439), wchar_t(0x0000) }; + static std::wstring const a_End = { wchar_t(0x0430) }; + static std::wstring const o_End = { wchar_t(0x043E) }; + static std::wstring const ya_End = { wchar_t(0x044F) }; + static std::wstring const ie_End = { wchar_t(0x0435) }; + static std::wstring const i_End = { wchar_t(0x0438) }; + static std::wstring const yeru_End = { wchar_t(0x044B) }; + static std::wstring const u_End = { wchar_t(0x0443) }; + static std::wstring const yu_End = { wchar_t(0x044E) }; + static std::wstring const oj_End = { wchar_t(0x043E), wchar_t(0x0439) }; + static std::wstring const ie_j_End = { wchar_t(0x0435), wchar_t(0x0439) }; + static std::wstring const io_j_End = { wchar_t(0x0451), wchar_t(0x0439) }; + static std::wstring const o_m_End = { wchar_t(0x043E), wchar_t(0x043C) }; + static std::wstring const io_m_End = { wchar_t(0x0451), wchar_t(0x043C) }; + static std::wstring const ie_m_End = { wchar_t(0x0435), wchar_t(0x043C) }; + static std::wstring const soft_End = { wchar_t(0x044C) }; + static std::wstring const j_End = { wchar_t(0x0439) }; static std::array, 6> const dropEnds = {{ { &a_End, &o_End, &ya_End, &ie_End, &soft_End, &j_End, nullptr }, -- cgit v1.2.3