diff options
author | Jack Lloyd <[email protected]> | 2015-07-23 23:53:28 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-07-23 23:53:28 -0400 |
commit | c3b243d95e3c200af7fe4533bec6ab8d9f8a27d9 (patch) | |
tree | fb51c52bdf2e1fe0e5bc1fd47b52b3a3ecf16846 /src/lib/math/bigint/bigint.cpp | |
parent | aaf7af95d54dd015a6649f5bdf32e3746a6ac1c2 (diff) |
BigInt::to_u32bit failed on 32-bit integers. GH #220
Diffstat (limited to 'src/lib/math/bigint/bigint.cpp')
-rw-r--r-- | src/lib/math/bigint/bigint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp index c9aa1d981..045117cbd 100644 --- a/src/lib/math/bigint/bigint.cpp +++ b/src/lib/math/bigint/bigint.cpp @@ -142,7 +142,7 @@ u32bit BigInt::to_u32bit() const { if(is_negative()) throw Encoding_Error("BigInt::to_u32bit: Number is negative"); - if(bits() >= 32) + if(bits() > 32) throw Encoding_Error("BigInt::to_u32bit: Number is too big to convert"); u32bit out = 0; |