From 94ebd2816ed1cbf08334573175d2ed1dec18f962 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 7 Nov 2022 11:21:27 +0100 Subject: fix use after free --- serialize/magnum-vector2i.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'serialize/magnum-vector2i.hpp') diff --git a/serialize/magnum-vector2i.hpp b/serialize/magnum-vector2i.hpp index 7b78d73f..d1074b55 100644 --- a/serialize/magnum-vector2i.hpp +++ b/serialize/magnum-vector2i.hpp @@ -1,8 +1,7 @@ #include "compat/assert.hpp" -#include "serialize/string.hpp" #include +#include #include -#include #include namespace nlohmann { @@ -21,7 +20,7 @@ struct adl_serializer> final } static void from_json(const json& j, Magnum::Math::Vector2& val) { - Corrade::Containers::StringView str = j; + std::string str = j; using type = std::conditional_t, std::intmax_t, std::uintmax_t>; constexpr auto format_string = std::is_signed_v ? "%jd x %jd%n" : "%ju x %ju%n"; type x = 0, y = 0; -- cgit v1.2.3