diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-02-08 21:56:24 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-02-08 21:56:24 +0100 |
commit | 236432e4e87dd005d77ce991a6bdce5b91355c1b (patch) | |
tree | 72f4772de9fe1be2a21046adc49ca1418c47d979 /mpq | |
parent | d3ba78edc26a1592e13db6ad25ebdaef9f0d6373 (diff) | |
download | gmp-236432e4e87dd005d77ce991a6bdce5b91355c1b.tar.gz |
* mpq/cmp_ui.c: DIVIDE_BY_ZERO if den2==0.
Diffstat (limited to 'mpq')
-rw-r--r-- | mpq/cmp_ui.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mpq/cmp_ui.c b/mpq/cmp_ui.c index e425919f1..4992252d8 100644 --- a/mpq/cmp_ui.c +++ b/mpq/cmp_ui.c @@ -35,6 +35,9 @@ _mpq_cmp_ui (const MP_RAT *op1, unsigned long int num2, unsigned long int den2) int cc; TMP_DECL (marker); + if (den2 == 0) + DIVIDE_BY_ZERO; + if (num1_size == 0) return -(num2 != 0); if (num1_size < 0) |