aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-07-06 06:52:13 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-07-06 06:52:13 -0700
commita0b7b105236d5bc65e8d3a35f1b4f34bcc5e3705 (patch)
tree5c913a2350c9abb8c894773113f2448aebfba541 /bfd/bfd.c
parent4b617f5235fb680563571cecfdb03e3b3493444b (diff)
downloadgdb-a0b7b105236d5bc65e8d3a35f1b4f34bcc5e3705.zip
gdb-a0b7b105236d5bc65e8d3a35f1b4f34bcc5e3705.tar.gz
gdb-a0b7b105236d5bc65e8d3a35f1b4f34bcc5e3705.tar.bz2
Convert 'L' to 'l' when setting wide_width to 1
When setting wide_width to 1, convert 'L' to 'l'. Otherwise, %Lx/%Lu/%Ld will be passed to fprintf which will treat the argument as long long. * bfd.c (_doprnt): Convert 'L' to 'l' when setting wide_width to 1.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index b6cdf3f..a119ac4 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -727,7 +727,10 @@ _doprnt (FILE *stream, const char *format, va_list ap)
either long long or long. */
if ((BFD_ARCH_SIZE < 64 || BFD_HOST_64BIT_LONG)
&& sptr[-2] == 'L')
- wide_width = 1;
+ {
+ wide_width = 1;
+ sptr[-2] = 'l';
+ }
switch (wide_width)
{