From b1b3914ccf0f0626858d32508c31b421e2a7d138 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 10 Apr 2021 15:41:35 -0700 Subject: [PATCH] tipc: Result is first raw data word, not last --- .../include/stratosphere/tipc/tipc_server_manager.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp b/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp index 7f15b2afb..465d2fc41 100644 --- a/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/tipc/tipc_server_manager.hpp @@ -301,12 +301,11 @@ namespace ams::tipc { const svc::ipc::MessageBuffer::MessageHeader message_header(message_buffer); const svc::ipc::MessageBuffer::SpecialHeader special_header(message_buffer, message_header); - /* Determine raw data index and extents. */ + /* Determine raw data index. */ const auto raw_data_offset = message_buffer.GetRawDataIndex(message_header, special_header); - const auto raw_data_count = message_header.GetRawCount(); - /* Result is the last raw data word. */ - const Result method_result = message_buffer.GetRaw(raw_data_offset + raw_data_count - 1); + /* Result is the first raw data word. */ + const Result method_result = message_buffer.GetRaw(raw_data_offset); /* Check that the result is the special deferral result. */ return tipc::ResultRequestDeferred::Includes(method_result);