diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-06-02 07:51:02 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-06-02 07:51:02 +0200 |
commit | 6e987dca92a13c0106bb112b39fa1effa1a939ed (patch) | |
tree | 050889b5fcb6cd172ce6d1cb5cea78e4419bf59f /mpz | |
parent | 72de4ca34beb14f810783cae18df7b1d04d8c8f0 (diff) | |
download | gmp-6e987dca92a13c0106bb112b39fa1effa1a939ed.tar.gz |
__gmp_tmp_debug_alloc does not like to alloc 0 limbs.
Diffstat (limited to 'mpz')
-rw-r--r-- | mpz/get_str.c | 2 | ||||
-rw-r--r-- | mpz/out_str.c | 2 |
2 files changed, 2 insertions, 2 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); } diff --git a/mpz/out_str.c b/mpz/out_str.c index b4341ac91..3fd0666e6 100644 --- a/mpz/out_str.c +++ b/mpz/out_str.c @@ -79,7 +79,7 @@ mpz_out_str (FILE *stream, 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); } |