diff --git a/Minecraft.Client/Platform/Common/UI/UIController.cpp b/Minecraft.Client/Platform/Common/UI/UIController.cpp index 43cc941ea..7497af253 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIController.cpp @@ -516,14 +516,9 @@ IggyLibrary UIController::loadSkin(const std::wstring &skinPath, const std::wstr { byteArray baFile = app.getArchiveFile(skinPath); - // Copy 32-bit wchar_t to 16-bit IggyUTF16 - std::vector utf16Name(skinName.length() + 1); - for(size_t i = 0; i < skinName.length(); ++i) { - utf16Name[i] = static_cast(skinName[i]); - } - utf16Name[skinName.length()] = 0; // null terminator + const std::u16string convSkinName = convWstringToU16string(skinName); - lib = IggyLibraryCreateFromMemoryUTF16( utf16Name.data() , (void *)baFile.data, baFile.length, NULL ); + lib = IggyLibraryCreateFromMemoryUTF16( convSkinName.data() , (void *)baFile.data, baFile.length, NULL ); delete[] baFile.data; #ifdef _DEBUG diff --git a/Minecraft.Client/Platform/Linux/Iggy/include/iggy.h b/Minecraft.Client/Platform/Linux/Iggy/include/iggy.h index c56fb1f82..e253f59ae 100644 --- a/Minecraft.Client/Platform/Linux/Iggy/include/iggy.h +++ b/Minecraft.Client/Platform/Linux/Iggy/include/iggy.h @@ -108,7 +108,7 @@ typedef enum IggyDatatype #include IDOCN typedef wchar_t IggyUTF16; #else -typedef char16_t IggyUTF16; +typedef const char16_t IggyUTF16; #endif typedef struct IggyStringUTF16