Skip to content

Commit

Permalink
Fix minimum number of limbs i cpp_int: fixes #145
Browse files Browse the repository at this point in the history
  • Loading branch information
jzmaddock committed Jul 19, 2019
1 parent 536bc41 commit 8d2357d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/boost/multiprecision/cpp_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ struct cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, fals
BOOST_STATIC_CONSTANT(unsigned, internal_limb_count =
MinBits
? (MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0))
: (sizeof(limb_data) / sizeof(limb_type)));
: (sizeof(limb_data) / sizeof(limb_type)) > 1 ? (sizeof(limb_data) / sizeof(limb_type)) : 2);
BOOST_STATIC_CONSTANT(bool, variable = true);

private:
Expand Down

0 comments on commit 8d2357d

Please sign in to comment.