diff --git a/stratosphere/loader/source/ldr_loader_service.cpp b/stratosphere/loader/source/ldr_loader_service.cpp index 58a870d5d..04add5883 100644 --- a/stratosphere/loader/source/ldr_loader_service.cpp +++ b/stratosphere/loader/source/ldr_loader_service.cpp @@ -81,7 +81,7 @@ namespace sts::ldr { } Result LoaderService::GetProcessModuleInfo(Out count, OutPointerWithClientSize out, u64 process_id) { - if (out.num_elements > std::numeric_limits::max()) { + if (out.num_elements > std::numeric_limits::max()) { return ResultLoaderInvalidSize; } diff --git a/stratosphere/loader/source/ldr_process_creation.cpp b/stratosphere/loader/source/ldr_process_creation.cpp index 93b1d30b6..ad81b9615 100644 --- a/stratosphere/loader/source/ldr_process_creation.cpp +++ b/stratosphere/loader/source/ldr_process_creation.cpp @@ -520,7 +520,7 @@ namespace sts::ldr { } /* Validate size. */ - if (file_size > segment->size || file_size > std::numeric_limits::max() || segment->size > std::numeric_limits::max()) { + if (file_size > segment->size || file_size > std::numeric_limits::max() || segment->size > std::numeric_limits::max()) { return ResultLoaderInvalidNso; }