From 4990064019bcee2e8e5876093739f768a10bc098 Mon Sep 17 00:00:00 2001 From: tege Date: Mon, 6 May 2002 20:55:27 +0200 Subject: (main): Don't call mpz_sizeinbase with negative base. --- demos/pexpr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.1