diff options
author | tege <tege@gmplib.org> | 2002-05-06 20:55:27 +0200 |
---|---|---|
committer | tege <tege@gmplib.org> | 2002-05-06 20:55:27 +0200 |
commit | 4990064019bcee2e8e5876093739f768a10bc098 (patch) | |
tree | b25335ad237a0c9a8bc202090dbd4ee10f0a7c71 | |
parent | 1f3201c50def6a1f0257cd8842ad20044ca0c1d6 (diff) | |
download | gmp-4990064019bcee2e8e5876093739f768a10bc098.tar.gz |
(main): Don't call mpz_sizeinbase with negative base.
-rw-r--r-- | demos/pexpr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/pexpr.c b/demos/pexpr.c index 3a9562b9f..a6106b8c1 100644 --- a/demos/pexpr.c +++ b/demos/pexpr.c @@ -434,7 +434,7 @@ main (int argc, char **argv) size_t out_len; char *tmp, *s; - out_len = mpz_sizeinbase (r, base) + 2; + out_len = mpz_sizeinbase (r, base >= 0 ? base : -base) + 2; tmp = malloc (out_len); if (print_timing) |