mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +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)
|
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);
|
// fuck wchar_t
|
||||||
|
int characterId =region->name[9] - '0' < 0 ? -1 : region->name[9] - '0';
|
||||||
if (characterId == -1)
|
if (characterId == -1)
|
||||||
{
|
{
|
||||||
app.DebugPrintf("Invalid character to render found\n");
|
app.DebugPrintf("Invalid character to render found\n");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue