[Kernel] Fix achievement iterator inside XGIUserWriteAchievements

Thanks to jgoyvaerts for noticing it!
This commit is contained in:
emoose 2018-11-17 23:49:46 +00:00
parent 40145b8dbb
commit 9b8ebcfe7b
No known key found for this signature in database
GPG Key ID: 3735C67912F5FF97
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ X_RESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
bool modified = false; bool modified = false;
auto* achievement = auto* achievement =
(X_XUSER_ACHIEVEMENT*)memory_->TranslateVirtual(achievements_ptr); (X_XUSER_ACHIEVEMENT*)memory_->TranslateVirtual(achievements_ptr);
for (uint32_t i = 0; i < achievement_count; i++) { util::XdbfAchievement ach;
util::XdbfAchievement ach; for (uint32_t i = 0; i < achievement_count; i++, achievement++) {
if (game_gpd->GetAchievement(achievement->achievement_id, &ach)) { if (game_gpd->GetAchievement(achievement->achievement_id, &ach)) {
if (!ach.IsUnlocked()) { if (!ach.IsUnlocked()) {
XELOGI("Achievement Unlocked! %ws (%d gamerscore) - %ws", XELOGI("Achievement Unlocked! %ws (%d gamerscore) - %ws",