diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-10-02 21:56:32 -0400 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-10-02 21:56:32 -0400 |
commit | 9aaf1c0df808e7811be0b9727f3f109dd5dde7dd (patch) | |
tree | 9aaa81084ff626da11ec3ed6d6107f677e0622ac /src | |
parent | bd14f397ce142f4552018554532ceb230e12bde5 (diff) |
aoc_u: Fix edge case with DLC that causes breaks
In some games (Splatoon 2 and Splatoon 2 Splatfest World Premiere, notably), pass offset=0 and count=2047 into the ListAddOnContent method which should return all DLCs for the current title. The (presumably) intended behavior is to successfully return a empty array but because of a < v. <= in an if statement, a failure error code was returned causing these games to svcBreak. This fixes that if statement.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/service/aoc/aoc_u.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index cfc28fa0c..79580bcd9 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -84,7 +84,7 @@ void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { out.push_back(static_cast<u32>(add_on_content[i] & 0x7FF)); } - if (out.size() <= offset) { + if (out.size() < offset) { IPC::ResponseBuilder rb{ctx, 2}; // TODO(DarkLordZach): Find the correct error code. rb.Push(ResultCode(-1)); |