diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-09-24 14:02:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 14:02:11 +0200 |
commit | c8512839d78249a441a354a4072779c982fd4305 (patch) | |
tree | 7fa0f1fa088cc3c96903381967542317b5f914d7 /src/core/hle/service/acc/profile_manager.cpp | |
parent | Merge pull request #7043 from astrelsky/cmake (diff) | |
parent | core/profile_select: Avoid uninitialized read in SelectProfile() (diff) | |
download | yuzu-c8512839d78249a441a354a4072779c982fd4305.tar yuzu-c8512839d78249a441a354a4072779c982fd4305.tar.gz yuzu-c8512839d78249a441a354a4072779c982fd4305.tar.bz2 yuzu-c8512839d78249a441a354a4072779c982fd4305.tar.lz yuzu-c8512839d78249a441a354a4072779c982fd4305.tar.xz yuzu-c8512839d78249a441a354a4072779c982fd4305.tar.zst yuzu-c8512839d78249a441a354a4072779c982fd4305.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 24a1c9157..568303ced 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp @@ -208,9 +208,10 @@ bool ProfileManager::UserExists(UUID uuid) const { } bool ProfileManager::UserExistsIndex(std::size_t index) const { - if (index >= MAX_USERS) + if (index >= MAX_USERS) { return false; - return profiles[index].user_uuid.uuid != Common::INVALID_UUID; + } + return profiles[index].user_uuid.IsValid(); } /// Opens a specific user @@ -304,7 +305,7 @@ bool ProfileManager::RemoveUser(UUID uuid) { bool ProfileManager::SetProfileBase(UUID uuid, const ProfileBase& profile_new) { const auto index = GetUserIndex(uuid); - if (!index || profile_new.user_uuid == UUID(Common::INVALID_UUID)) { + if (!index || profile_new.user_uuid.IsInvalid()) { return false; } @@ -346,7 +347,7 @@ void ProfileManager::ParseUserSaveFile() { } for (const auto& user : data.users) { - if (user.uuid == UUID(Common::INVALID_UUID)) { + if (user.uuid.IsInvalid()) { continue; } |