From 58417994203aac551f60a74f9ae31bccc27b5139 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Wed, 31 Aug 2022 15:14:30 +0100 Subject: [PATCH] Fix decoding of IOCTLs with padding at the end --- .../nvdrv/devices/deserialisation/deserialisation.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/services/nvdrv/devices/deserialisation/deserialisation.h b/app/src/main/cpp/skyline/services/nvdrv/devices/deserialisation/deserialisation.h index 8d5cdb34..a2919606 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/devices/deserialisation/deserialisation.h +++ b/app/src/main/cpp/skyline/services/nvdrv/devices/deserialisation/deserialisation.h @@ -55,7 +55,11 @@ namespace skyline::service::nvdrv::deserialisation { return make_ref_tuple(buffer.subspan(offset).template cast, std::dynamic_extent, true>()); } else if constexpr (IsPad::value) { offset += ArgType::Bytes; - return DecodeArgumentsImpl(buffer, offset, saveSlots); + if constexpr(sizeof...(ArgTypes) == 0) { + return std::tuple{}; + } else { + return DecodeArgumentsImpl(buffer, offset, saveSlots); + } } else if constexpr (IsSave::value) { saveSlots[ArgType::SaveSlot] = buffer.subspan(offset).template as, true>(); offset += sizeof(RemoveSave);