mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-29 00:55:37 +00:00
service/acc: Correct error case within TrySelectUserWithoutInteraction()
empty() in this case will always return false, since the returned container is a std::array. Instead, check if all given users are invalid before returning the error code.
This commit is contained in:
parent
e1ea8cc721
commit
cd47af8af0
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue