summaryrefslogtreecommitdiff
path: root/integer.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-11-13 12:30:46 -0500
committerJeffrey Walton <noloader@gmail.com>2017-11-13 12:30:46 -0500
commit660681a884c6fac23de5037f93c8720f66baecb3 (patch)
tree0daef65af749af66193e00555fb785723929bc5a /integer.cpp
parent51eca5dd874fa422dacf9b02e887728fd222fcdb (diff)
downloadcryptopp-git-660681a884c6fac23de5037f93c8720f66baecb3.tar.gz
Fix SunCC 12.2 compile
Diffstat (limited to 'integer.cpp')
-rw-r--r--integer.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/integer.cpp b/integer.cpp
index 52644ffc..ef5c2b67 100644
--- a/integer.cpp
+++ b/integer.cpp
@@ -256,16 +256,17 @@ class DWord
{
public:
#if defined(CRYPTOPP_NATIVE_DWORD_AVAILABLE)
- DWord() : m_whole() { }
+ DWord() {std::memset(&m_whole, 0x00, sizeof(m_whole));}
#else
- DWord() : m_halfs() { }
+ DWord() {std::memset(&m_halfs, 0x00, sizeof(m_halfs));}
#endif
#ifdef CRYPTOPP_NATIVE_DWORD_AVAILABLE
explicit DWord(word low) : m_whole(low) { }
#else
- explicit DWord(word low) : m_halfs()
+ explicit DWord(word low)
{
+ m_halfs.high = 0;
m_halfs.low = low;
}
#endif
@@ -279,10 +280,10 @@ public:
#if defined(CRYPTOPP_NATIVE_DWORD_AVAILABLE)
# if defined(CRYPTOPP_LITTLE_ENDIAN)
const word t[2] = {low,high};
- memcpy(&m_whole, &t, sizeof(m_whole));
+ memcpy(&m_whole, t, sizeof(m_whole));
# else
const word t[2] = {high,low};
- memcpy(&m_whole, &t, sizeof(m_whole));
+ memcpy(&m_whole, t, sizeof(m_whole));
# endif
#else
m_halfs.low = low;