[Issue 18256] Using std.range.put to put a character into a dchar[] segfaults

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 22 18:30:23 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18256

John Colvin <john.loughran.colvin at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |john.loughran.colvin at gmail.
                   |                            |com
         Resolution|---                         |INVALID

--- Comment #1 from John Colvin <john.loughran.colvin at gmail.com> ---
You're writing to a string literal, which isn't allowed.

change to 

dchar[] a = "aaa"d.dup;

and it works fine.

--


More information about the Digitalmars-d-bugs mailing list