From b8e4eaac87e8325647258dec58cd9279284532cc Mon Sep 17 00:00:00 2001 From: XMRig Date: Thu, 21 Mar 2024 21:03:35 +0700 Subject: [PATCH] Fix rapidjson assert. --- src/base/net/http/HttpApiResponse.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/base/net/http/HttpApiResponse.cpp b/src/base/net/http/HttpApiResponse.cpp index e6758df9..3ee38a09 100644 --- a/src/base/net/http/HttpApiResponse.cpp +++ b/src/base/net/http/HttpApiResponse.cpp @@ -1,7 +1,7 @@ /* XMRig * Copyright (c) 2014-2019 heapwolf - * Copyright (c) 2018-2021 SChernykh - * Copyright (c) 2016-2021 XMRig , + * Copyright (c) 2018-2024 SChernykh + * Copyright (c) 2016-2024 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,6 @@ * along with this program. If not, see . */ - #include "base/net/http/HttpApiResponse.h" #include "3rdparty/rapidjson/prettywriter.h" #include "3rdparty/rapidjson/stringbuffer.h" @@ -65,7 +64,7 @@ void xmrig::HttpApiResponse::end() } } - if (!m_doc.MemberCount()) { + if (m_doc.IsObject() && m_doc.ObjectEmpty()) { return HttpResponse::end(); }