From 5be7860cf733f6fc4eb7c77ace0578284106c263 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 27 Jun 2021 14:46:36 +0100 Subject: [PATCH] Fixup validity check in mmnv IRequest::Get Fixes a random crash in SMO when launching the game for the first time. --- app/src/main/cpp/skyline/services/mmnv/IRequest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/services/mmnv/IRequest.cpp b/app/src/main/cpp/skyline/services/mmnv/IRequest.cpp index ae449e13..e7f065ac 100644 --- a/app/src/main/cpp/skyline/services/mmnv/IRequest.cpp +++ b/app/src/main/cpp/skyline/services/mmnv/IRequest.cpp @@ -126,10 +126,9 @@ namespace skyline::service::mmnv { Result IRequest::Get(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { u32 id{request.Pop()}; - u32 freqHz{request.Pop()}; std::lock_guard lock(requestsMutex); - if (id >= requests.size()) { + if (id < requests.size()) { auto &req{requests[id]}; if (req) { state.logger->Debug("Get frequency for request {}: {} Hz", id, req->freqHz);