From: Nick Clifton Date: Mon, 10 Jun 2019 14:30:02 +0000 (+0100) Subject: Fix printing large decimal values in strings. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6a636ce375d5af4ce0b3aa78b1cc90fd82040bd;p=binutils-gdb.git Fix printing large decimal values in strings. PR 24651 * strings.c (print_strings): Use %u to print unsigned values in decimal. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index b845caca035..5565bb5708c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2019-06-10 Christos Zoulas + + PR 24651 + * strings.c (print_strings): Use %u to print unsigned values in + decimal. + 2019-06-10 Christos Zoulas PR 24649 diff --git a/binutils/strings.c b/binutils/strings.c index 648bdc08127..ea48f92feba 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);