aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-05-07 17:36:27 +0200
committerRiccardo Spagni <ric@spagni.net>2019-05-07 17:36:27 +0200
commitf64f59627dddd65a6a99cc057586f6460b5154e1 (patch)
treedf76e8e335fc6bb9ac6948b3f571023553dbcea7 /src/cryptonote_basic
parent97cb1c9436ec0e9f7f1468703a51596a2b8e3833 (diff)
parente9809382109765ce53fcbd95e1fc593d9b19e184 (diff)
downloadmonzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.gz
monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.tar.xz
monzero-core-f64f59627dddd65a6a99cc057586f6460b5154e1.zip
Merge pull request #5510
e9809382 fix wide difficulty conversion with some versions of boost (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/cryptonote_boost_serialization.h4
1 files changed, 2 insertions, 2 deletions
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<uint64_t>();
a & v;
// store low part
- x_ = x << 64 >> 64;
+ x_ = x & 0xffffffffffffffff;
v = x_.convert_to<uint64_t>();
a & v;
}