diff options
Diffstat (limited to 'stdio-common/vfprintf-process-arg.c')
-rw-r--r-- | stdio-common/vfprintf-process-arg.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stdio-common/vfprintf-process-arg.c b/stdio-common/vfprintf-process-arg.c index 2c651946df..24c9125f9f 100644 --- a/stdio-common/vfprintf-process-arg.c +++ b/stdio-common/vfprintf-process-arg.c @@ -196,6 +196,9 @@ LABEL (unsigned_number): /* Unsigned number of base BASE. */ /* Account for 0X, 0x, 0B or 0b hex or binary marker. */ width -= 2; + if (octal_marker) + --width; + if (is_negative || showsign || space) --width; @@ -257,6 +260,9 @@ LABEL (unsigned_number): /* Unsigned number of base BASE. */ width -= 2; } + if (octal_marker) + --width; + width -= workend - string + prec; Xprintf_buffer_pad (buf, L_('0'), prec); |