diff options
author | Nick Clifton <nickc@redhat.com> | 2019-06-10 15:30:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-06-10 15:30:02 +0100 |
commit | c6a636ce375d5af4ce0b3aa78b1cc90fd82040bd (patch) | |
tree | 5a0a29a92ae11c3b7f67ef3baccd41fc54ec432f /binutils | |
parent | 9bf7038bb229d6e46a1f1861c257fc47843f114d (diff) | |
download | gdb-c6a636ce375d5af4ce0b3aa78b1cc90fd82040bd.zip gdb-c6a636ce375d5af4ce0b3aa78b1cc90fd82040bd.tar.gz gdb-c6a636ce375d5af4ce0b3aa78b1cc90fd82040bd.tar.bz2 |
Fix printing large decimal values in strings.
PR 24651
* strings.c (print_strings): Use %u to print unsigned values in
decimal.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/strings.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index b845cac..5565bb5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,11 @@ 2019-06-10 Christos Zoulas <christos@zoulas.com> + PR 24651 + * strings.c (print_strings): Use %u to print unsigned values in + decimal. + +2019-06-10 Christos Zoulas <christos@zoulas.com> + PR 24649 * arsup.c (ar_open): Use asprintf in place of xmalloc and sprintf. diff --git a/binutils/strings.c b/binutils/strings.c index 648bdc0..ea48f92 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -633,7 +633,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address, if (sizeof (start) > sizeof (long)) { # ifndef __MSVCRT__ - printf ("%7lld ", (unsigned long long) start); + printf ("%7llu ", (unsigned long long) start); # else printf ("%7I64d ", (unsigned long long) start); # endif @@ -641,7 +641,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address, else #elif !BFD_HOST_64BIT_LONG if (start != (unsigned long) start) - printf ("++%7ld ", (unsigned long) start); + printf ("++%7lu ", (unsigned long) start); else #endif printf ("%7ld ", (long) start); |