From 4321457550636d508bf623a6ae1704ce7b1bac9a Mon Sep 17 00:00:00 2001 From: pelissip Date: Tue, 21 Sep 2004 11:46:11 +0000 Subject: Add a new test and clarify a comment. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2981 280ebfd0-de03-0410-8827-d642c229c3f4 --- strtofr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'strtofr.c') diff --git a/strtofr.c b/strtofr.c index 2fcda2553..b38554782 100644 --- a/strtofr.c +++ b/strtofr.c @@ -325,7 +325,10 @@ parse_string (mpfr_t x, struct parsed_string *pstr, if (pstr->prec == 0) { /* Check if there was a prefix (in such a case, we have to read - again the mantissa without skipping the prefix) */ + again the mantissa without skipping the prefix) + The allocated mantissa is still enought big since we will + read only 0, and we alloc one more char than needed. + FIXME: Not really friendly. Maybe cleaner code? */ if (prefix_str != NULL) { str = prefix_str; -- cgit v1.2.1