From 660681a884c6fac23de5037f93c8720f66baecb3 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 13 Nov 2017 12:30:46 -0500 Subject: Fix SunCC 12.2 compile --- integer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'integer.cpp') 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; -- cgit v1.2.1