diff options
author | bunnei <bunneidev@gmail.com> | 2018-03-31 22:05:19 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-03-31 22:06:46 +0200 |
commit | eef097bdc7dfbc0738ed3cacaded0773a223885b (patch) | |
tree | 51d8a8411499745968444a89973201d4cb3007ec /src | |
parent | fsp_srv: Implement GetSize and SetSize. (diff) | |
download | yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.tar yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.tar.gz yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.tar.bz2 yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.tar.lz yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.tar.xz yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.tar.zst yuzu-eef097bdc7dfbc0738ed3cacaded0773a223885b.zip |
Diffstat (limited to 'src')
-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..4bbeb0a16 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=%08x is greater than buffer_size=%08x", 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); |