nn_act: Fix errors in Mii name (#95)

nn_act: Don't swap the Mii name again
Account: Zero out miiName before copying in data
This commit is contained in:
IntriguingTiles 2022-08-28 03:32:10 -06:00 committed by GitHub
parent ef61361b87
commit 07ce5b0aa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -369,7 +369,7 @@ void nnActExport_GetMiiName(PPCInterpreter_t* hCPU)
sint32 miiNameLength = 0;
for (sint32 i = 0; i < MII_FFL_NAME_LENGTH; i++)
{
miiName[i] = _swapEndianU16(miiData->miiName[i]);
miiName[i] = miiData->miiName[i];
if (miiData->miiName[i] == (const uint16be)'\0')
break;
miiNameLength = i+1;
@ -392,7 +392,7 @@ void nnActExport_GetMiiNameEx(PPCInterpreter_t* hCPU)
sint32 miiNameLength = 0;
for (sint32 i = 0; i < MII_FFL_NAME_LENGTH; i++)
{
miiName[i] = _swapEndianU16(miiData->miiName[i]);
miiName[i] = miiData->miiName[i];
if (miiData->miiName[i] == (const uint16be)'\0')
break;
miiNameLength = i + 1;