aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-07-23 23:53:28 -0400
committerJack Lloyd <[email protected]>2015-07-23 23:53:28 -0400
commitc3b243d95e3c200af7fe4533bec6ab8d9f8a27d9 (patch)
treefb51c52bdf2e1fe0e5bc1fd47b52b3a3ecf16846 /src/lib/math/bigint
parentaaf7af95d54dd015a6649f5bdf32e3746a6ac1c2 (diff)
BigInt::to_u32bit failed on 32-bit integers. GH #220
Diffstat (limited to 'src/lib/math/bigint')
-rw-r--r--src/lib/math/bigint/bigint.cpp2
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;