[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:32:20 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18256
Jack Stouffer <jack at jackstouffer.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #2 from Jack Stouffer <jack at jackstouffer.com> ---
(In reply to John Colvin from comment #1)
> You're writing to a string literal, which isn't allowed.
>
> change to
>
> dchar[] a = "aaa"d.dup;
>
> and it works fine.
I'm aware it's not allowed. The operative term was segfault, as opposed to
giving an error.
--
More information about the Digitalmars-d-bugs
mailing list