mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-13 17:49:06 +00:00
Add fix for skin selector
This commit is contained in:
@@ -715,9 +715,10 @@ 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);
|
||||
// int characterId = -1;
|
||||
// swscanf((wchar_t*)region->name,L"Character%d",&characterId);
|
||||
// fuck wchar_t
|
||||
int characterId =region->name[9] - '0' < 0 ? -1 : region->name[9] - '0';
|
||||
if (characterId == -1)
|
||||
{
|
||||
app.DebugPrintf("Invalid character to render found\n");
|
||||
|
||||
Reference in New Issue
Block a user