summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ldn
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-11-23 19:25:14 +0100
committerLioncash <mathew1800@gmail.com>2022-11-23 19:43:20 +0100
commit97f273e94e83a679f42faa9c81916a1c058112e1 (patch)
treee2a2777ae3bec31b544516988fae36e8080150ff /src/core/hle/service/ldn
parenthle_ipc: Add helper functions for getting number of buffer elements (diff)
downloadyuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.gz
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.bz2
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.lz
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.xz
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.tar.zst
yuzu-97f273e94e83a679f42faa9c81916a1c058112e1.zip
Diffstat (limited to 'src/core/hle/service/ldn')
-rw-r--r--src/core/hle/service/ldn/ldn.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp
index 6df563136..c49c61cff 100644
--- a/src/core/hle/service/ldn/ldn.cpp
+++ b/src/core/hle/service/ldn/ldn.cpp
@@ -292,7 +292,7 @@ public:
void GetNetworkInfoLatestUpdate(Kernel::HLERequestContext& ctx) {
const std::size_t network_buffer_size = ctx.GetWriteBufferSize(0);
- const std::size_t node_buffer_count = ctx.GetWriteBufferSize(1) / sizeof(NodeLatestUpdate);
+ const std::size_t node_buffer_count = ctx.GetWriteBufferNumElements<NodeLatestUpdate>(1);
if (node_buffer_count == 0 || network_buffer_size != sizeof(NetworkInfo)) {
LOG_ERROR(Service_LDN, "Invalid buffer, size = {}, count = {}", network_buffer_size,
@@ -333,7 +333,7 @@ public:
const auto channel{rp.PopEnum<WifiChannel>()};
const auto scan_filter{rp.PopRaw<ScanFilter>()};
- const std::size_t network_info_size = ctx.GetWriteBufferSize() / sizeof(NetworkInfo);
+ const std::size_t network_info_size = ctx.GetWriteBufferNumElements<NetworkInfo>();
if (network_info_size == 0) {
LOG_ERROR(Service_LDN, "Invalid buffer size {}", network_info_size);