diff --git a/Source/UI/Window/UILocaleTextWnd.cpp b/Source/UI/Window/UILocaleTextWnd.cpp index 7a2fe04d9..c8403603d 100644 --- a/Source/UI/Window/UILocaleTextWnd.cpp +++ b/Source/UI/Window/UILocaleTextWnd.cpp @@ -2,6 +2,7 @@ #include "UI/Text/UIStaticTextControl.h" #include "Utility/Cipher/XorBytes.h" +#include #include #include #include @@ -19,6 +20,14 @@ public: } } + // INLINED + template + explicit EncryptedName(const std::array& source) : m_encrypted(true) { + for (std::uint64_t index = 0; index < Length; ++index) { + this->m_text[index] = source[index]; + } + } + ~EncryptedName() { for (std::uint64_t index = 0; index < Length; ++index) { this->m_text[index] = 0; @@ -70,7 +79,7 @@ void CUISubTab::OnCreate(int width, int height) { this->stampImage->Move(58, 0); { CUIStaticImage* stamp = this->stampImage; - const char stampSource[] = {'\x9D', '\x44', '\xB3', '\xB3', '\x5B', '\x87', '\xA4', '\xC2', '\x9B', '\x0F', '\xB3', '\x85', '\x26', '\xF3', '\x3D', '\x4E', '\x39', '\x9D', + const std::array stampSource = {'\x9D', '\x44', '\xB3', '\xB3', '\x5B', '\x87', '\xA4', '\xC2', '\x9B', '\x0F', '\xB3', '\x85', '\x26', '\xF3', '\x3D', '\x4E', '\x39', '\x9D', '\x16', '\x27', '\xEF', '\x3C', '\x13', '\x6A', '\x1A', '\x9E', '\x1A', '\x2D', '\xFE', '\x15', '\x12', '\x7B', '\x3C', '\x86', '\x03', '\x16', '\xF8', '\x26', '\x0C', '\x7F', '\x31', '\x8E', '\x07', '\x2C', '\xFF', '\x16', '\x12', '\x7A', '\x3F', '\xC5', '\x11', '\x24', '\xEB', '\x49'}; thread_local EncryptedName stampName(stampSource);