diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index 8b2444d1da3..2a35194c519 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -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;