From 9aaf1c0df808e7811be0b9727f3f109dd5dde7dd Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Tue, 2 Oct 2018 21:56:32 -0400 Subject: 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. --- src/core/hle/service/aoc/aoc_u.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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(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)); -- cgit v1.2.3