diff options
author | Kevin Ryde <user42@zip.com.au> | 2000-05-25 01:56:09 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2000-05-25 01:56:09 +0200 |
commit | 070c94566ba8d3fceb3b2cc0fad83ebd3b09be4e (patch) | |
tree | 70ecae49b74c52723ff8d8f2c90fca9b40d250fd /mpf/iset_str.c | |
parent | 4b004a7fe11c21a822fe83ae205405c36e66676e (diff) | |
download | gmp-070c94566ba8d3fceb3b2cc0fad83ebd3b09be4e.tar.gz |
* mpf/iset_str.c: Initialize _mp_size and _mp_exp to 0, in case no
digits in string, so it's the same as a separate init and set_str.
Diffstat (limited to 'mpf/iset_str.c')
-rw-r--r-- | mpf/iset_str.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mpf/iset_str.c b/mpf/iset_str.c index 54034ad1b..bece1051e 100644 --- a/mpf/iset_str.c +++ b/mpf/iset_str.c @@ -1,6 +1,6 @@ /* mpf_init_set_str -- Initialize a float and assign it from a string. -Copyright (C) 1995, 1996 Free Software Foundation, Inc. +Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -35,6 +35,8 @@ mpf_init_set_str (r, s, base) mp_size_t prec = __gmp_default_fp_limb_precision; r->_mp_d = (mp_ptr) (*_mp_allocate_func) ((prec + 1) * BYTES_PER_MP_LIMB); r->_mp_prec = prec; + r->_mp_size = 0; + r->_mp_exp = 0; return mpf_set_str (r, s, base); } |