about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/printf_fp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index c63c1e1afc..e532400f09 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -988,7 +988,7 @@ __guess_grouping (unsigned int intdig_max, const char *grouping,
       else if (*grouping == 0)
 	{
 	  /* Same grouping repeats.  */
-	  groups += intdig_max / grouping[-1];
+	  groups += (intdig_max - 1) / grouping[-1];
 	  break;
 	}
     }