From 6ff85eebe513c8663c100c99b54e7be2296a4f61 Mon Sep 17 00:00:00 2001 From: Andrew King Date: Sat, 21 May 2022 20:23:30 -0400 Subject: [PATCH] bugfix for #2100: null-dereference in GCC 12.1.0 --- src/SFML/Network/Http.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SFML/Network/Http.cpp b/src/SFML/Network/Http.cpp index 29c2c0bc..0a88b242 100644 --- a/src/SFML/Network/Http.cpp +++ b/src/SFML/Network/Http.cpp @@ -261,7 +261,10 @@ void Http::Response::parse(const std::string& data) std::istreambuf_iterator it(in); std::istreambuf_iterator 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)