diff options
Diffstat (limited to 'src/lib/math/numbertheory/pow_mod.cpp')
-rw-r--r-- | src/lib/math/numbertheory/pow_mod.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/math/numbertheory/pow_mod.cpp b/src/lib/math/numbertheory/pow_mod.cpp index 00917a5f9..02434fe68 100644 --- a/src/lib/math/numbertheory/pow_mod.cpp +++ b/src/lib/math/numbertheory/pow_mod.cpp @@ -65,8 +65,8 @@ void Power_Mod::set_modulus(const BigInt& n, Usage_Hints hints, bool disable_mon */ void Power_Mod::set_base(const BigInt& b) const { - if(b.is_zero() || b.is_negative()) - throw Invalid_Argument("Power_Mod::set_base: arg must be > 0"); + if(b.is_negative()) + throw Invalid_Argument("Power_Mod::set_base: arg must be non-negative"); if(!m_core) throw Internal_Error("Power_Mod::set_base: m_core was NULL"); |