summaryrefslogtreecommitdiff
path: root/mpq
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-11-07 22:06:23 +0100
committerKevin Ryde <user42@zip.com.au>2001-11-07 22:06:23 +0100
commitd1bf88760ab283548840eb7da36bf66efb93f14b (patch)
treecdbd5133a29f41a2be1c622106a0a2581cf0710b /mpq
parentd45a6762815bb2b5a86924a455f23e53d6353f15 (diff)
downloadgmp-d1bf88760ab283548840eb7da36bf66efb93f14b.tar.gz
* mpq/set_si.c, mpq/set_ui.c: Set _mp_den._mp_size correctly if den==0.
Diffstat (limited to 'mpq')
-rw-r--r--mpq/set_si.c2
-rw-r--r--mpq/set_ui.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mpq/set_si.c b/mpq/set_si.c
index 5b9ce4a5a..72ec5e867 100644
--- a/mpq/set_si.c
+++ b/mpq/set_si.c
@@ -43,5 +43,5 @@ mpq_set_si (MP_RAT *dest, signed long int num, unsigned long int den)
}
dest->_mp_den._mp_d[0] = den;
- dest->_mp_den._mp_size = 1;
+ dest->_mp_den._mp_size = (den != 0);
}
diff --git a/mpq/set_ui.c b/mpq/set_ui.c
index 715060ad9..36380b72f 100644
--- a/mpq/set_ui.c
+++ b/mpq/set_ui.c
@@ -39,5 +39,5 @@ mpq_set_ui (MP_RAT *dest, unsigned long int num, unsigned long int den)
}
dest->_mp_den._mp_d[0] = den;
- dest->_mp_den._mp_size = 1;
+ dest->_mp_den._mp_size = (den != 0);
}