summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-11-15 04:02:16 +0100
committerGitHub <noreply@github.com>2018-11-15 04:02:16 +0100
commit0478308094d16c7f4198517870fb4b87c1819a48 (patch)
tree53eee2e5b7737dfff61f3e65eb3e68567d834a2d
parentMerge pull request #1695 from lioncash/tr (diff)
parentservice/acc: Correct error case within TrySelectUserWithoutInteraction() (diff)
downloadyuzu-0478308094d16c7f4198517870fb4b87c1819a48.tar
yuzu-0478308094d16c7f4198517870fb4b87c1819a48.tar.gz
yuzu-0478308094d16c7f4198517870fb4b87c1819a48.tar.bz2
yuzu-0478308094d16c7f4198517870fb4b87c1819a48.tar.lz
yuzu-0478308094d16c7f4198517870fb4b87c1819a48.tar.xz
yuzu-0478308094d16c7f4198517870fb4b87c1819a48.tar.zst
yuzu-0478308094d16c7f4198517870fb4b87c1819a48.zip
-rw-r--r--src/core/hle/service/acc/acc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 8318eff5f..c629f9357 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -252,8 +252,10 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex
rb.PushRaw<u128>(INVALID_UUID);
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.PushRaw<u128>(INVALID_UUID);
return;