Bug 15663 – writefln("%#o", 0) should yield "0" instead of "00"
Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-02-09T10:44:00Z
Last change time
2016-02-12T08:43:31Z
Keywords
pull
Assigned to
nobody
Creator
Marco.Leise
Comments
Comment #0 by Marco.Leise — 2016-02-09T10:44:50Z
The #-flag should prefix %o, %x and %X with '0', '0x' and '0X' respectively, IF the input is different from 0. While the hex printout matches printf(), the octal output is "00" instead of "0".