summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-02-09 23:50:26 +0100
committerLioncash <mathew1800@gmail.com>2021-02-09 23:50:29 +0100
commit0cd40fb5239bc3df092e2e3d21e8a3acc661b55a (patch)
treebfeca36f8db67f039868349aa2270f537867c327 /src/core
parentam/controller: Remove [[fallthrough]] from unreachable path (diff)
downloadyuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.tar
yuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.tar.gz
yuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.tar.bz2
yuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.tar.lz
yuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.tar.xz
yuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.tar.zst
yuzu-0cd40fb5239bc3df092e2e3d21e8a3acc661b55a.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/sockets/bsd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp
index 0b306b87a..78e9cd708 100644
--- a/src/core/hle/service/sockets/bsd.cpp
+++ b/src/core/hle/service/sockets/bsd.cpp
@@ -453,7 +453,8 @@ std::pair<s32, Errno> BSD::SocketImpl(Domain domain, Type type, Protocol protoco
return {-1, Errno::MFILE};
}
- FileDescriptor& descriptor = file_descriptors[fd].emplace();
+ file_descriptors[fd] = FileDescriptor{};
+ FileDescriptor& descriptor = *file_descriptors[fd];
// ENONMEM might be thrown here
LOG_INFO(Service, "New socket fd={}", fd);
@@ -548,7 +549,8 @@ std::pair<s32, Errno> BSD::AcceptImpl(s32 fd, std::vector<u8>& write_buffer) {
return {-1, Translate(bsd_errno)};
}
- FileDescriptor& new_descriptor = file_descriptors[new_fd].emplace();
+ file_descriptors[new_fd] = FileDescriptor{};
+ FileDescriptor& new_descriptor = *file_descriptors[new_fd];
new_descriptor.socket = std::move(result.socket);
new_descriptor.is_connection_based = descriptor.is_connection_based;