diff options
author | tege <tege@gmplib.org> | 2000-06-07 21:08:55 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2000-06-07 21:08:55 +0200 |
commit | 6c72c1ac9f6981e2aef2672a0469deb396fdd48c (patch) | |
tree | 14a17cef6fc382f3783bc2a727d9435796f03dc5 | |
parent | cb780919d07f744bd8efbee511a30d961797710f (diff) | |
download | gmp-6c72c1ac9f6981e2aef2672a0469deb396fdd48c.tar.gz |
Fail for `src' being zero.
-rw-r--r-- | mpz/remove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/remove.c b/mpz/remove.c index ce2708d3d..56475f10d 100644 --- a/mpz/remove.c +++ b/mpz/remove.c @@ -32,12 +32,12 @@ mpz_remove (dest, src, f) mpz_srcptr f; #endif { - mpz_t fpow[40]; /* inexhastible...until year 2020 or so */ + mpz_t fpow[40]; /* inexhaustible...until year 2020 or so */ mpz_t x, rem; unsigned long int pwr; int p; - if (mpz_cmp_ui (f, 1) <= 0) + if (mpz_cmp_ui (f, 1) <= 0 || mpz_sgn (src) == 0) DIVIDE_BY_ZERO; if (mpz_cmp_ui (f, 2) == 0) { |