diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-07-28 06:51:44 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-07-28 06:51:47 +0200 |
commit | bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13 (patch) | |
tree | dc93022ab556c18745274f825fedb0195be35c92 | |
parent | services/bsd: Implement most of bsd:s (diff) | |
download | yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.tar yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.tar.gz yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.tar.bz2 yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.tar.lz yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.tar.xz yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.tar.zst yuzu-bc699ace15fc2dd2cc7ff022fa9ec6031ba09d13.zip |
-rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 1d20f33a4..803505452 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -465,6 +465,11 @@ std::pair<s32, Errno> BSD::PollImpl(std::vector<u8>& write_buffer, std::vector<u return {-1, Errno::INVAL}; } + if (nfds == 0) { + // When no entries are provided, -1 is returned with errno zero + return {-1, Errno::SUCCESS}; + } + const size_t length = std::min(read_buffer.size(), write_buffer.size()); std::vector<PollFD> fds(nfds); std::memcpy(fds.data(), read_buffer.data(), length); |