diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-02 19:05:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-02 19:05:25 +0200 |
commit | f92594d744eedc6f8b01c5d5f761b55b7035be1f (patch) | |
tree | 487a643bbd523b37e95ba1fc1bd3baa576831485 /src/core/hle/kernel/hle_ipc.cpp | |
parent | Merge pull request #288 from Subv/macro_interpreter (diff) | |
parent | hle_ipc, fsp_srv: Cleanup logging. (diff) | |
download | yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.tar yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.tar.gz yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.tar.bz2 yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.tar.lz yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.tar.xz yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.tar.zst yuzu-f92594d744eedc6f8b01c5d5f761b55b7035be1f.zip |
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.cpp')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index ffcbfe64f..bef4f15f5 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -268,8 +268,11 @@ std::vector<u8> HLERequestContext::ReadBuffer() const { size_t HLERequestContext::WriteBuffer(const void* buffer, size_t size) const { const bool is_buffer_b{BufferDescriptorB().size() && BufferDescriptorB()[0].Size()}; - - ASSERT_MSG(size <= GetWriteBufferSize(), "Size %lx is too big", size); + const size_t buffer_size{GetWriteBufferSize()}; + if (size > buffer_size) { + LOG_CRITICAL(Core, "size (%016zx) is greater than buffer_size (%016zx)", size, buffer_size); + size = buffer_size; // TODO(bunnei): This needs to be HW tested + } if (is_buffer_b) { Memory::WriteBlock(BufferDescriptorB()[0].Address(), buffer, size); |