diff --git a/Minecraft.Client/Platform/Common/UI/UIScene.cpp b/Minecraft.Client/Platform/Common/UI/UIScene.cpp index 32cda10b3..3d72effdb 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene.cpp @@ -1248,7 +1248,7 @@ bool UIScene::isReadyToDelete() return true; } -static int UIScene::parseSlotId(const char16_t *s) { +int UIScene::parseSlotId(const char16_t *s) { // must be nonnull, must start with 'slot_', first char after the underscore must be a digit if (!s || (s[0] != u's' || s[1] != u'l' || s[2] != u'o' || s[3] != u't' || diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DebugOverlay.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DebugOverlay.cpp index ddb76747e..6e274fef3 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DebugOverlay.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DebugOverlay.cpp @@ -120,7 +120,7 @@ void UIScene_DebugOverlay::customDraw(IggyCustomDrawCallbackRegion *region) if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return; int itemId = -1; - // 4jcraft: TODO: UB on our platform since this casts char16_t* to wchar_t* + // 4jcraft TODO: UB on our platform since this casts char16_t* to wchar_t* swscanf((wchar_t*)region->name,L"item_%d",&itemId); if (itemId == -1 || itemId > Item::ITEM_NUM_COUNT || Item::items[itemId] == NULL) { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp index 2111c2e34..31acee5f7 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp @@ -714,6 +714,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) void UIScene_SkinSelectMenu::customDraw(IggyCustomDrawCallbackRegion *region) { int characterId = -1; + // 4jcraft TODO: undefined behavior swscanf((wchar_t*)region->name,L"Character%d",&characterId); if (characterId == -1) {