fix: accidentally declared static in the implementation

This commit is contained in:
Tropical 2026-03-12 03:14:32 -05:00
parent 3a44eab5c0
commit 253fce563f
3 changed files with 3 additions and 2 deletions

View file

@ -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' ||

View file

@ -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)
{

View file

@ -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)
{