diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-01-27 02:09:17 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-01-27 02:09:17 +0100 |
commit | 251a995247e7c3e5c2203f2f0c1cbff54fe7ed21 (patch) | |
tree | 41b191ddb2914aa3b4612b2076e08808c84a5967 /mpf/get_str.c | |
parent | c7a3489940c83d054c270b523b3632ff47b6da50 (diff) | |
download | gmp-251a995247e7c3e5c2203f2f0c1cbff54fe7ed21.tar.gz |
Correction to:
* mpz/get_str.c, mpf/get_str.c: Make allocated string block exactly
strlen(str)+1 bytes.
Need to update pointer on reallocation.
Diffstat (limited to 'mpf/get_str.c')
-rw-r--r-- | mpf/get_str.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mpf/get_str.c b/mpf/get_str.c index d8a5a0f04..59eb1689c 100644 --- a/mpf/get_str.c +++ b/mpf/get_str.c @@ -427,7 +427,8 @@ mpf_get_str (char *digit_ptr, mp_exp_t *exp, int base, size_t n_digits, mpf_srcp { size_t actual_size = strlen (digit_ptr) + 1; if (actual_size != alloc_size) - (*__gmp_reallocate_func) (digit_ptr, alloc_size, actual_size); + digit_ptr = (*__gmp_reallocate_func) (digit_ptr, + alloc_size, actual_size); } return digit_ptr; |