diff options
-rw-r--r-- | stdio-common/vfprintf-internal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stdio-common/vfprintf-internal.c b/stdio-common/vfprintf-internal.c index e01c319b19..b1c8f5c43e 100644 --- a/stdio-common/vfprintf-internal.c +++ b/stdio-common/vfprintf-internal.c @@ -2154,7 +2154,8 @@ group_number (CHAR_T *front_ptr, CHAR_T *w, CHAR_T *rear_ptr, copy_rest: /* No further grouping to be done. Copy the rest of the number. */ - memmove (w, s, (front_ptr -s) * sizeof (CHAR_T)); + w -= s - front_ptr; + memmove (w, front_ptr, (s - front_ptr) * sizeof (CHAR_T)); break; } else if (*grouping != '\0') |