Fix VS2008/MSVC 14.00 compiler crash

pull/398/head
Jeffrey Walton 2017-03-19 06:57:51 -04:00
parent 7fb6b3df74
commit a3d0da2e0e
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 3 additions and 1 deletions

4
drbg.h
View File

@ -519,9 +519,11 @@ void Hash_DRBG<HASH, STRENGTH, SEEDLENGTH>::Hash_Generate(const byte* additional
PutWord(false, BIG_ENDIAN_ORDER, p1, static_cast<word64>(r));
i -= 8; j -= 8; k=0; carry = static_cast<int>(r >> 64);
#else
byte t[8];
PutWord<word64>(false, BIG_ENDIAN_ORDER, t, m_reseed);
while (k>=0)
{
carry = m_v[i] + m_c[i] + h[j] + GetByte<word64>(BIG_ENDIAN_ORDER, m_reseed, k) + carry;
carry = m_v[i] + m_c[i] + h[j] + t[k] + carry;
m_v[i] = static_cast<byte>(carry);
i--; j--; k--; carry >>= 8;
}