From eef097bdc7dfbc0738ed3cacaded0773a223885b Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 31 Mar 2018 16:05:19 -0400 Subject: hle_ipc: Do not ensure write buffer size. --- src/core/hle/kernel/hle_ipc.cpp | 7 +++++-- 1 file 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 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); -- cgit v1.2.3