Sfoglia il codice sorgente

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.

Zach Hilman 7 anni fa
parent
commit
9aaf1c0df8
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/core/hle/service/aoc/aoc_u.cpp

+ 1 - 1
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));