diff options
author | bunnei <bunneidev@gmail.com> | 2018-06-22 16:26:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 16:26:09 +0200 |
commit | 52a78228ddfb83f4353150fc0e118fbfbdbbc4ea (patch) | |
tree | f50f9bdd0eec1b8a0692b283ce31b2c55c6209fe /src | |
parent | Merge pull request #577 from mailwl/audren-update (diff) | |
parent | IPC: skip empty buffer write (diff) | |
download | yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.tar yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.tar.gz yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.tar.bz2 yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.tar.lz yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.tar.xz yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.tar.zst yuzu-52a78228ddfb83f4353150fc0e118fbfbdbbc4ea.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 01904467e..b0d83f401 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -271,6 +271,11 @@ std::vector<u8> HLERequestContext::ReadBuffer(int buffer_index) const { } size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size, int buffer_index) const { + if (size == 0) { + NGLOG_WARNING(Core, "skip empty buffer write"); + return 0; + } + const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[buffer_index].Size()}; const size_t buffer_size{GetWriteBufferSize(buffer_index)}; if (size > buffer_size) { |