Skip to content

Commit

Permalink
Missing initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Dec 19, 2018
1 parent cfa6779 commit 4092d61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Math/Zp_Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void Zp_Data::init(const bigint& p,bool mont)
void Zp_Data::assign(const Zp_Data& Zp)
{ pr=Zp.pr;
mask=Zp.mask;
pr_byte_length = Zp.pr_byte_length;

montgomery=Zp.montgomery;
t=Zp.t;
Expand Down Expand Up @@ -113,6 +114,7 @@ ostream& operator<<(ostream& s,const Zp_Data& ZpD)
istream& operator>>(istream& s,Zp_Data& ZpD)
{
s >> ZpD.pr >> ZpD.montgomery;
ZpD.init(ZpD.pr, ZpD.montgomery);
if (ZpD.montgomery)
{ s >> ZpD.t >> ZpD.pi;
if (ZpD.t>MAX_MOD_SZ)
Expand Down

0 comments on commit 4092d61

Please sign in to comment.