bugfix for #2100: null-dereference in GCC 12.1.0

This commit is contained in:
Andrew King 2022-05-21 20:23:30 -04:00 committed by Lukas Dürrenberger
parent 9842c8fdf8
commit 6ff85eebe5

View File

@ -261,7 +261,10 @@ void Http::Response::parse(const std::string& data)
std::istreambuf_iterator<char> it(in);
std::istreambuf_iterator<char> itEnd;
for (std::size_t i = 0; ((i < length) && (it != itEnd)); i++)
m_body.push_back(*it++);
{
m_body.push_back(*it);
++it;
}
}
// Drop the rest of the line (chunk-extension)