diff options
| author | 2021-03-16 11:59:05 -0700 | |
|---|---|---|
| committer | 2021-03-16 11:59:05 -0700 | |
| commit | ab102787fa520a4ec6283bccfb108112acfbe03a (patch) | |
| tree | cdb861212e7d29c96ccbf7d5976ba6c418628b79 | |
| parent | Merge pull request #6069 from Morph1984/ngWord (diff) | |
| parent | bsd: Avoid writing empty buffers (diff) | |
| download | yuzu-ab102787fa520a4ec6283bccfb108112acfbe03a.tar.gz yuzu-ab102787fa520a4ec6283bccfb108112acfbe03a.tar.xz yuzu-ab102787fa520a4ec6283bccfb108112acfbe03a.zip | |
Merge pull request #6083 from Morph1984/bsd-avoid-writebuffer
bsd: Avoid writing empty buffers
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 78e9cd708..5fcd91f68 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -42,7 +42,9 @@ void BSD::PollWork::Execute(BSD* bsd) { | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) { | 44 | void BSD::PollWork::Response(Kernel::HLERequestContext& ctx) { |
| 45 | ctx.WriteBuffer(write_buffer); | 45 | if (write_buffer.size() > 0) { |
| 46 | ctx.WriteBuffer(write_buffer); | ||
| 47 | } | ||
| 46 | 48 | ||
| 47 | IPC::ResponseBuilder rb{ctx, 4}; | 49 | IPC::ResponseBuilder rb{ctx, 4}; |
| 48 | rb.Push(RESULT_SUCCESS); | 50 | rb.Push(RESULT_SUCCESS); |
| @@ -55,7 +57,9 @@ void BSD::AcceptWork::Execute(BSD* bsd) { | |||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) { | 59 | void BSD::AcceptWork::Response(Kernel::HLERequestContext& ctx) { |
| 58 | ctx.WriteBuffer(write_buffer); | 60 | if (write_buffer.size() > 0) { |
| 61 | ctx.WriteBuffer(write_buffer); | ||
| 62 | } | ||
| 59 | 63 | ||
| 60 | IPC::ResponseBuilder rb{ctx, 5}; | 64 | IPC::ResponseBuilder rb{ctx, 5}; |
| 61 | rb.Push(RESULT_SUCCESS); | 65 | rb.Push(RESULT_SUCCESS); |