account: Fix wrong condition in TrySelectUserWithoutInteraction (#2384)
* account: Fix wrong condition in TrySelectUserWithoutInteraction Since the implementation of User Profiles, we can get more than one profile stored. This PR fixes a wrong condition in `TrySelectUserWithoutInteraction`. Closes #2320 * Some cleanup
This commit is contained in:
parent
aca1c37d4b
commit
992ab77f1f
1 changed files with 4 additions and 4 deletions
|
@ -62,7 +62,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||||
|
|
||||||
foreach (UserProfile userProfile in profiles)
|
foreach (UserProfile userProfile in profiles)
|
||||||
{
|
{
|
||||||
if (offset + 0x10 > (ulong)outputSize)
|
if (offset + 0x10 > outputSize)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||||
|
|
||||||
public ResultCode TrySelectUserWithoutInteraction(ServiceCtx context)
|
public ResultCode TrySelectUserWithoutInteraction(ServiceCtx context)
|
||||||
{
|
{
|
||||||
if (context.Device.System.AccountManager.GetUserCount() != 1)
|
if (context.Device.System.AccountManager.GetUserCount() < 1)
|
||||||
{
|
{
|
||||||
// Invalid UserId.
|
// Invalid UserId.
|
||||||
UserId.Null.Write(context.ResponseData);
|
UserId.Null.Write(context.ResponseData);
|
||||||
|
@ -144,7 +144,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||||
|
|
||||||
public ResultCode StoreSaveDataThumbnail(ServiceCtx context)
|
public ResultCode StoreSaveDataThumbnail(ServiceCtx context)
|
||||||
{
|
{
|
||||||
ResultCode resultCode = CheckUserId(context, out UserId userId);
|
ResultCode resultCode = CheckUserId(context, out UserId _);
|
||||||
|
|
||||||
if (resultCode != ResultCode.Success)
|
if (resultCode != ResultCode.Success)
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
||||||
|
|
||||||
public ResultCode ClearSaveDataThumbnail(ServiceCtx context)
|
public ResultCode ClearSaveDataThumbnail(ServiceCtx context)
|
||||||
{
|
{
|
||||||
ResultCode resultCode = CheckUserId(context, out UserId userId);
|
ResultCode resultCode = CheckUserId(context, out UserId _);
|
||||||
|
|
||||||
if (resultCode != ResultCode.Success)
|
if (resultCode != ResultCode.Success)
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue