Skip to content

Commit

Permalink
fix(math): use the constructor argument for range check
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Apr 26, 2024
1 parent a060312 commit abdbe03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tachyon/math/finite_fields/small_prime_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class PrimeField<_Config, std::enable_if_t<!_Config::kIsSpecialPrime &&
DCHECK_LT(value_, GetModulus());
}
constexpr explicit PrimeField(const BigInt<N>& value) : PrimeField(value[0]) {
DCHECK_LT(value_, GetModulus());
DCHECK_LT(value[0], GetModulus());
}
constexpr PrimeField(const PrimeField& other) = default;
constexpr PrimeField& operator=(const PrimeField& other) = default;
Expand Down

0 comments on commit abdbe03

Please sign in to comment.