From 6cc769065d8e22b167013aa8f519dc6017ac8a2d Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sun, 31 Jan 2021 01:02:32 -0500 Subject: [PATCH] bsd: Fix GetSockOpt stub --- src/core/hle/service/sockets/bsd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 4ffb009024..9a5b329750 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -263,11 +263,15 @@ void BSD::GetSockOpt(Kernel::HLERequestContext& ctx) { LOG_WARNING(Service, "(STUBBED) called. fd={} level={} optname=0x{:x}", fd, level, optname); + std::vector optval(ctx.GetWriteBufferSize()); + + ctx.WriteBuffer(optval); + IPC::ResponseBuilder rb{ctx, 5}; rb.Push(RESULT_SUCCESS); rb.Push(-1); rb.PushEnum(Errno::NOTCONN); - rb.Push(0); + rb.Push(static_cast(optval.size())); } void BSD::Listen(Kernel::HLERequestContext& ctx) {