mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
fix: accidentally declared static in the implementation
This commit is contained in:
parent
b20c17c4b7
commit
682c898563
|
|
@ -1248,7 +1248,7 @@ bool UIScene::isReadyToDelete()
|
||||||
return true;
|
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
|
// must be nonnull, must start with 'slot_', first char after the underscore must be a digit
|
||||||
if (!s ||
|
if (!s ||
|
||||||
(s[0] != u's' || s[1] != u'l' || s[2] != u'o' || s[3] != u't' ||
|
(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;
|
if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return;
|
||||||
|
|
||||||
int itemId = -1;
|
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);
|
swscanf((wchar_t*)region->name,L"item_%d",&itemId);
|
||||||
if (itemId == -1 || itemId > Item::ITEM_NUM_COUNT || Item::items[itemId] == NULL)
|
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)
|
void UIScene_SkinSelectMenu::customDraw(IggyCustomDrawCallbackRegion *region)
|
||||||
{
|
{
|
||||||
int characterId = -1;
|
int characterId = -1;
|
||||||
|
// 4jcraft TODO: undefined behavior
|
||||||
swscanf((wchar_t*)region->name,L"Character%d",&characterId);
|
swscanf((wchar_t*)region->name,L"Character%d",&characterId);
|
||||||
if (characterId == -1)
|
if (characterId == -1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue