From 13224104e49c9f8b24070ace3e5fe87402b89ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 28 Jun 2018 22:23:21 +0200 Subject: [PATCH] Ensure HTTP request variables lives till it is used (#7744) Solves https://www.reddit.com/r/openrct2/comments/8uftdh/ --- src/openrct2/network/Http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/network/Http.cpp b/src/openrct2/network/Http.cpp index c4fb7b896e..2090f8a3ee 100644 --- a/src/openrct2/network/Http.cpp +++ b/src/openrct2/network/Http.cpp @@ -101,10 +101,10 @@ Response Do(const Request & req) std::runtime_error("Failed to initialize curl"); Response res; + WriteThis wt; if (req.method == Method::POST || req.method == Method::PUT) { - WriteThis wt; wt.readptr = req.body.c_str(); wt.sizeleft = req.body.size();