This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new de21025702 fix a bug of strtold
de21025702 is described below

commit de21025702aa86a0d3aa883b518d7db4e1873aa9
Author: lilei19 <[email protected]>
AuthorDate: Mon Feb 6 18:45:37 2023 +0800

    fix a bug of strtold
    
      if input is -1e308,The output should be -100000000......
      but the output is -inf
---
 libs/libc/stdlib/lib_strtold.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libs/libc/stdlib/lib_strtold.c b/libs/libc/stdlib/lib_strtold.c
index 4814578bac..5338b7c183 100644
--- a/libs/libc/stdlib/lib_strtold.c
+++ b/libs/libc/stdlib/lib_strtold.c
@@ -401,12 +401,10 @@ static long_double decfloat(FAR char *ptr, FAR char 
**endptr)
   else if (num_digit + num_decimal > ldbl_max_10_exp)
     {
       errno = ERANGE;
-      return ldbl_max * ldbl_max;
     }
   else if (num_digit + num_decimal < ldbl_min_10_exp)
     {
       errno = ERANGE;
-      return ldbl_min * ldbl_min;
     }
 
   if (k % 9)

Reply via email to