diff --git a/src/crypto/CryptoNight_monero.h b/src/crypto/CryptoNight_monero.h index ea1622ab..942940a4 100644 --- a/src/crypto/CryptoNight_monero.h +++ b/src/crypto/CryptoNight_monero.h @@ -38,8 +38,9 @@ # define VARIANT1_INIT(part) \ uint64_t tweak1_2_##part = 0; \ if (VARIANT > 0) { \ - volatile const uint64_t a = *reinterpret_cast(input + 35 + part * size); \ - volatile const uint64_t b = *(reinterpret_cast(ctx[part]->state) + 24); \ + uint64_t a, b; \ + memcpy(&a, input + 35 + part * size, sizeof a); \ + memcpy(&b, ctx[part]->state + 192, sizeof b); \ tweak1_2_##part = a ^ b; \ } #endif