Update rpc_client.cpp

This commit is contained in:
moss9001 2021-12-02 15:32:15 +02:00
parent ec0398c83f
commit 77791b2d20

View file

@ -644,13 +644,13 @@ void http_call_impl<s>::read_body_exact() {
auto avail = buf.size();
if (avail > content_length)
if (avail > ((size_t)content_length))
FC_THROW("invalid response body (content length mismatch)");
body.resize(content_length);
if (avail) {
if (avail != buf.sgetn(&body[0], avail))
if (avail != ((size_t)buf.sgetn(&body[0], avail)))
FC_THROW("stream read failed");
}