aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-05-24 07:06:07 -0400
committerJack Lloyd <[email protected]>2019-05-24 07:06:07 -0400
commitd3706175d560ed8fbf3f4d3961cae910be1c77e0 (patch)
treea791958ae6eeefef5f10a72213a69553dabb707f /src/lib/math
parent78dff743222447cd626c6a7a1d94c5ccd46de02b (diff)
Add script for running TLS fuzzer
Fix a few minor issues found thereby
Diffstat (limited to 'src/lib/math')
-rw-r--r--src/lib/math/numbertheory/pow_mod.cpp4
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");