From 2f50bf0007f943e294613c0111b617d26261a52c Mon Sep 17 00:00:00 2001 From: B3n30 Date: Mon, 23 Jul 2018 18:02:35 +0200 Subject: [PATCH] Service/HTTP_C: Fix error in CreateContext --- src/core/hle/service/http_c.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/http_c.cpp b/src/core/hle/service/http_c.cpp index e5af90b7c..bba46265d 100644 --- a/src/core/hle/service/http_c.cpp +++ b/src/core/hle/service/http_c.cpp @@ -59,14 +59,13 @@ void HTTP_C::CreateContext(Kernel::HLERequestContext& ctx) { return; } - ++context_counter; - contexts.emplace(context_counter, Context()); + contexts.emplace(++context_counter, Context()); contexts[context_counter].url = std::move(url); contexts[context_counter].method = method; contexts[context_counter].state = RequestState::NotStarted; // TODO(Subv): Find a correct default value for this field. contexts[context_counter].socket_buffer_size = 0; - contexts[context_counter].handle = ++context_counter; + contexts[context_counter].handle = context_counter; IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); rb.Push(RESULT_SUCCESS);