From e9809382109765ce53fcbd95e1fc593d9b19e184 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Wed, 1 May 2019 19:57:34 +0000 Subject: fix wide difficulty conversion with some versions of boost --- src/cryptonote_basic/cryptonote_boost_serialization.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cryptonote_basic') diff --git a/src/cryptonote_basic/cryptonote_boost_serialization.h b/src/cryptonote_basic/cryptonote_boost_serialization.h index 3dd98f0c6..79ce610a9 100644 --- a/src/cryptonote_basic/cryptonote_boost_serialization.h +++ b/src/cryptonote_basic/cryptonote_boost_serialization.h @@ -365,11 +365,11 @@ namespace boost else { // store high part - cryptonote::difficulty_type x_ = x >> 64; + cryptonote::difficulty_type x_ = (x >> 64) & 0xffffffffffffffff; uint64_t v = x_.convert_to(); a & v; // store low part - x_ = x << 64 >> 64; + x_ = x & 0xffffffffffffffff; v = x_.convert_to(); a & v; } -- cgit v1.2.3