summaryrefslogtreecommitdiff
path: root/mpz/get_str.c
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2012-06-02 07:51:02 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2012-06-02 07:51:02 +0200
commit6e987dca92a13c0106bb112b39fa1effa1a939ed (patch)
tree050889b5fcb6cd172ce6d1cb5cea78e4419bf59f /mpz/get_str.c
parent72de4ca34beb14f810783cae18df7b1d04d8c8f0 (diff)
downloadgmp-6e987dca92a13c0106bb112b39fa1effa1a939ed.tar.gz
__gmp_tmp_debug_alloc does not like to alloc 0 limbs.
Diffstat (limited to 'mpz/get_str.c')
-rw-r--r--mpz/get_str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpz/get_str.c b/mpz/get_str.c
index c70119409..70ad589ce 100644
--- a/mpz/get_str.c
+++ b/mpz/get_str.c
@@ -82,7 +82,7 @@ mpz_get_str (char *res_str, int base, mpz_srcptr x)
xp = PTR (x);
if (! POW2_P (base))
{
- xp = TMP_ALLOC_LIMBS (x_size);
+ xp = TMP_ALLOC_LIMBS (x_size | 1); /* |1 in case x_size==0 */
MPN_COPY (xp, PTR (x), x_size);
}