[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libdfp-patches] [PATCH] Fix comparison operator on strtod32.c



Hi,

This fixes a bug in the code where we need a "less than" rather than a
"less than or equal" operator.

2010-11-08  Luis Machado  <luisgpm@xxxxxxxxxx>

	* strtod32.c (FUNCTION_L_INTERNAL): Fix comparison operator.

Index: strtod32.c
===================================================================
--- a/strtod32.c	(revision 11992)
+++ b/strtod32.c	(working copy)
@@ -956,7 +956,7 @@
 	startp += decimal_len;
 #endif
 
-	if (int_no <= MANT_DIG)
+	if (int_no < MANT_DIG)
 	  {
 	    if(base == 10)
 	      d32 = d32*10 + *startp - L_('0');