mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-06 01:53:39 +00:00
Add fix for skin selector
This commit is contained in:
parent
c55443b5be
commit
928e97e84e
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue