mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-07 04:17:15 +00:00
fix: accidentally declared static in the implementation
This commit is contained in:
parent
3a44eab5c0
commit
253fce563f
|
|
@ -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' ||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue