Add a makeCopy()

This commit is contained in:
Andreas Fabri 2021-10-13 23:11:56 +01:00
parent f13e14994c
commit 64a64e1a8a
1 changed files with 1 additions and 0 deletions

View File

@ -505,6 +505,7 @@ inline void getKaryExpo(const BigInt& z, BigInt& m, int& e, unsigned long uk) {
BigInt k(uk), q, r;
e = 0;
m = z;
m.makeCopy();
for(;;) {
divide_qr(m.get_mp(), k.get_mp(), q.get_mp(), r.get_mp());
if (!r.get_mp().is_zero()) break;