[Issue 13065] New: writeln doesn't print the whole fixed size array of chars in some cases
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jul 7 02:25:03 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13065
Issue ID: 13065
Summary: writeln doesn't print the whole fixed size array of
chars in some cases
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: bearophile_hugs at eml.cc
void main() {
import std.stdio: writeln;
char[10] buf = 'X';
buf[5] = '\0';
writeln(buf);
writeln("", buf);
}
Output:
XXXXX
XXXXX XXXX
Expected Output:
XXXXX XXXX
XXXXX XXXX
--
More information about the Digitalmars-d-bugs
mailing list