diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-12-25 17:31:09 -0800 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-12-25 17:31:09 -0800 |
commit | d0b856cfbb99b1f1833a18ff556d517a7e3f04d8 (patch) | |
tree | c508f82310c51e97a5d489ebfe235f7c07dd8995 /src/BigInt.cc | |
parent | fb2e7158f66796b98d5f22245d251e460456aed3 (diff) |
Making the necessary changes to get libtommath, libtomcrypt and BigInt to compile under MSVC.
Diffstat (limited to 'src/BigInt.cc')
-rw-r--r-- | src/BigInt.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/BigInt.cc b/src/BigInt.cc index 73bfe29..8ec1b12 100644 --- a/src/BigInt.cc +++ b/src/BigInt.cc @@ -61,6 +61,8 @@ Balau::BigInt & Balau::BigInt::operator=(const BigInt & v) throw (GeneralExcepti if (mp_copy(v.m_bi, m_bi) != CRYPT_OK) throw GeneralException("Error while calling mp_init_copy"); + + return *this; } void Balau::BigInt::set(uint64_t v) throw (GeneralException) { @@ -149,7 +151,7 @@ uint64_t Balau::BigInt::to_uint64() const throw (GeneralException) { int64_t Balau::BigInt::to_int64() const throw (GeneralException) { if (mp_count_bits(m_bi) > 63) throw GeneralException("BigInt too big to fit in a int64"); - uint64_t v = 0; + int64_t v = 0; int shift = 0; int digit = 0; while (shift <= 63) { @@ -175,7 +177,7 @@ uint32_t Balau::BigInt::to_uint32() const throw (GeneralException) { int32_t Balau::BigInt::to_int32() const throw (GeneralException) { if (mp_count_bits(m_bi) > 31) throw GeneralException("BigInt too big to fit in a uint32"); - uint64_t v = 0; + int64_t v = 0; int shift = 0; int digit = 0; while (shift <= 31) { |