On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:char[2] s = '\0'; s[0] = cast(char)msg;puts(s.ptr); // remove this => no memory leakBut wait, is the string zero terminated?
Forget it, it should be.
Ola Fosheim Grøstad via Digitalmars-d Tue, 28 Jun 2016 13:06:18 -0700
On Tuesday, 28 June 2016 at 19:03:14 UTC, John Colvin wrote:char[2] s = '\0'; s[0] = cast(char)msg;puts(s.ptr); // remove this => no memory leakBut wait, is the string zero terminated?
Forget it, it should be.