diff options
| author | bunnei <bunneidev@gmail.com> | 2022-11-25 00:38:17 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-25 00:38:17 -0800 |
| commit | 64965cc658a6266ddb9878ffd53bd69e0a0f5b79 (patch) | |
| tree | 495b63ec25d2b5e8d5888004e5bca0dcdf67704b /src/core/hle/service/filesystem/fsp_srv.cpp | |
| parent | 20b62dbd30e597c6d3700a22fbde5bd10169dfb2 (diff) | |
| parent | 97f273e94e83a679f42faa9c81916a1c058112e1 (diff) | |
Merge pull request #9305 from lioncash/request
hle_ipc: Add helper function for determining element counts
Diffstat (limited to 'src/core/hle/service/filesystem/fsp_srv.cpp')
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index c08274ef9..fbb16a7da 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -277,7 +277,7 @@ private: LOG_DEBUG(Service_FS, "called."); // Calculate how many entries we can fit in the output buffer - const u64 count_entries = ctx.GetWriteBufferSize() / sizeof(FileSys::Entry); + const u64 count_entries = ctx.GetWriteBufferNumElements<FileSys::Entry>(); // Cap at total number of entries. const u64 actual_entries = std::min(count_entries, entries.size() - next_entry_index); @@ -543,7 +543,7 @@ public: LOG_DEBUG(Service_FS, "called"); // Calculate how many entries we can fit in the output buffer - const u64 count_entries = ctx.GetWriteBufferSize() / sizeof(SaveDataInfo); + const u64 count_entries = ctx.GetWriteBufferNumElements<SaveDataInfo>(); // Cap at total number of entries. const u64 actual_entries = std::min(count_entries, info.size() - next_entry_index); |
