diff --git a/crypto3/libs/multiprecision/include/nil/crypto3/multiprecision/cpp_int_modular/misc.hpp b/crypto3/libs/multiprecision/include/nil/crypto3/multiprecision/cpp_int_modular/misc.hpp index 938814bca6..ccc79be072 100644 --- a/crypto3/libs/multiprecision/include/nil/crypto3/multiprecision/cpp_int_modular/misc.hpp +++ b/crypto3/libs/multiprecision/include/nil/crypto3/multiprecision/cpp_int_modular/misc.hpp @@ -148,6 +148,8 @@ namespace boost { return i * cpp_int_modular_backend::limb_bits + boost::multiprecision::detail::find_msb(a.limbs()[i]); } + if (a.limbs()[0] == 0) // TODO here should assert/throw + return 1024; // Some big number to indicate that there is no bit 1 return boost::multiprecision::detail::find_msb(a.limbs()[0]); }