summaryrefslogtreecommitdiff
path: root/mpq/mul.c
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2018-04-26 23:37:52 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2018-04-26 23:37:52 +0200
commit50af3bf618a4a1e693b129779ed8cbe7c88dc430 (patch)
treea1501d13d45123d95f4f7f916a90792ee97b00c1 /mpq/mul.c
parent252c79afb2e57270a9b1c590ebc5db311a147642 (diff)
downloadgmp-50af3bf618a4a1e693b129779ed8cbe7c88dc430.tar.gz
mpq/: Support lazy mpq_t also in the denominator.
Diffstat (limited to 'mpq/mul.c')
-rw-r--r--mpq/mul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpq/mul.c b/mpq/mul.c
index 3fcae2fc7..270dafc95 100644
--- a/mpq/mul.c
+++ b/mpq/mul.c
@@ -61,7 +61,7 @@ mpq_mul (mpq_ptr prod, mpq_srcptr op1, mpq_srcptr op2)
/* We special case this to simplify allocation logic; gcd(0,x) = x
is a singular case for the allocations. */
SIZ(NUM(prod)) = 0;
- PTR(DEN(prod))[0] = 1;
+ MPZ_NEWALLOC (DEN(prod), 1)[0] = 1;
SIZ(DEN(prod)) = 1;
return;
}