From 76598cfac9a84493f728157465ea2e835e84b79d Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Thu, 2 Jan 2020 17:19:07 -0700 Subject: [PATCH] Filter savedata info rank correctly --- src/LibHac/FsService/SaveDataInfoFilterReader.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/LibHac/FsService/SaveDataInfoFilterReader.cs b/src/LibHac/FsService/SaveDataInfoFilterReader.cs index 50bda1a4..01dd7dec 100644 --- a/src/LibHac/FsService/SaveDataInfoFilterReader.cs +++ b/src/LibHac/FsService/SaveDataInfoFilterReader.cs @@ -149,8 +149,10 @@ namespace LibHac.FsService return false; } - // When filtering by secondary rank include primary ranks as well - if ((Rank & 1) == 1 || info.Rank == SaveDataRank.Primary) + var filterRank = (SaveDataRank)(Rank & 1); + + // When filtering by secondary rank, match on both primary and secondary ranks + if (filterRank == SaveDataRank.Primary && info.Rank == SaveDataRank.Secondary) { return false; }