aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/bigint/bigint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/bigint/bigint.cpp')
-rw-r--r--src/math/bigint/bigint.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp
index 6fa929b6d..6ee5a75e3 100644
--- a/src/math/bigint/bigint.cpp
+++ b/src/math/bigint/bigint.cpp
@@ -165,7 +165,7 @@ bool BigInt::get_bit(size_t n) const
/*
* Return bits {offset...offset+length}
*/
-size_t BigInt::get_substring(size_t offset, size_t length) const
+u32bit BigInt::get_substring(size_t offset, size_t length) const
{
if(length > 32)
throw Invalid_Argument("BigInt::get_substring: Substring size too big");
@@ -177,7 +177,7 @@ size_t BigInt::get_substring(size_t offset, size_t length) const
u64bit mask = (1 << length) - 1;
size_t shift = (offset % 8);
- return static_cast<size_t>((piece >> shift) & mask);
+ return static_cast<u32bit>((piece >> shift) & mask);
}
/*