1
0
Fork 0
forked from suyu/suyu

Merge pull request #1696 from lioncash/acc-cond

service/acc: Correct error case within TrySelectUserWithoutInteraction()
This commit is contained in:
bunnei 2018-11-14 19:02:16 -08:00 committed by GitHub
commit 0478308094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,8 +252,10 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex
rb.PushRaw<u128>(INVALID_UUID); rb.PushRaw<u128>(INVALID_UUID);
return; return;
} }
auto user_list = profile_manager->GetAllUsers();
if (user_list.empty()) { const auto user_list = profile_manager->GetAllUsers();
if (std::all_of(user_list.begin(), user_list.end(),
[](const auto& user) { return user.uuid == INVALID_UUID; })) {
rb.Push(ResultCode(-1)); // TODO(ogniK): Find the correct error code rb.Push(ResultCode(-1)); // TODO(ogniK): Find the correct error code
rb.PushRaw<u128>(INVALID_UUID); rb.PushRaw<u128>(INVALID_UUID);
return; return;