Fix printing large decimal values in strings.
PR 24651 * strings.c (print_strings): Use %u to print unsigned values in decimal.
This commit is contained in:
parent
9bf7038bb2
commit
c6a636ce37
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2019-06-10 Christos Zoulas <christos@zoulas.com>
|
||||||
|
|
||||||
PR 24649
|
PR 24649
|
||||||
|
|
|
@ -633,7 +633,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
|
||||||
if (sizeof (start) > sizeof (long))
|
if (sizeof (start) > sizeof (long))
|
||||||
{
|
{
|
||||||
# ifndef __MSVCRT__
|
# ifndef __MSVCRT__
|
||||||
printf ("%7lld ", (unsigned long long) start);
|
printf ("%7llu ", (unsigned long long) start);
|
||||||
# else
|
# else
|
||||||
printf ("%7I64d ", (unsigned long long) start);
|
printf ("%7I64d ", (unsigned long long) start);
|
||||||
# endif
|
# endif
|
||||||
|
@ -641,7 +641,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
|
||||||
else
|
else
|
||||||
#elif !BFD_HOST_64BIT_LONG
|
#elif !BFD_HOST_64BIT_LONG
|
||||||
if (start != (unsigned long) start)
|
if (start != (unsigned long) start)
|
||||||
printf ("++%7ld ", (unsigned long) start);
|
printf ("++%7lu ", (unsigned long) start);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
printf ("%7ld ", (long) start);
|
printf ("%7ld ", (long) start);
|
||||||
|
|
Loading…
Reference in New Issue