From 432ac24503082b2ec718b6364555bea05ab336f8 Mon Sep 17 00:00:00 2001 From: Hamish Milne Date: Fri, 10 Apr 2020 16:51:01 +0100 Subject: [PATCH] Fix memory region serialization (OSK crash) --- src/common/serialization/boost_discrete_interval.hpp | 3 ++- src/common/serialization/boost_interval_set.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/serialization/boost_discrete_interval.hpp b/src/common/serialization/boost_discrete_interval.hpp index 961a9a7ef7..f04e3cabc6 100644 --- a/src/common/serialization/boost_discrete_interval.hpp +++ b/src/common/serialization/boost_discrete_interval.hpp @@ -6,6 +6,7 @@ #include #include "common/common_types.h" +#include "common/logging/log.h" namespace boost::serialization { @@ -25,7 +26,7 @@ void load(Archive& ar, boost::icl::discrete_interval& obj, ar >> lower; ar >> upper; ar >> bounds; - obj = boost::icl::discrete_interval(upper, lower, boost::icl::interval_bounds(bounds)); + obj = boost::icl::discrete_interval(lower, upper, boost::icl::interval_bounds(bounds)); } template diff --git a/src/common/serialization/boost_interval_set.hpp b/src/common/serialization/boost_interval_set.hpp index d4e48e62a7..73a5603609 100644 --- a/src/common/serialization/boost_interval_set.hpp +++ b/src/common/serialization/boost_interval_set.hpp @@ -26,7 +26,7 @@ void load(Archive& ar, boost::icl::interval_set& set, const unsigned int file for (u64 i = 0; i < count; i++) { typename boost::icl::interval_set::interval_type value{}; ar >> value; - set.add(value); + set += value; } }