A debug class has started

Stanislav Blinov stanislav.blinov at gmail.com
Mon Dec 13 21:19:00 UTC 2021


On Monday, 13 December 2021 at 20:58:42 UTC, forkit wrote:

> immutable(char)[] replaceChar(char* str, ulong len, char ch1, 
> char ch2)
> //snip
>     return to!(immutable(char)[])(str);
> }


You're calling a `to` on a char pointer, which, ostensibly, would 
look for null terminator. Which there may not be any if you do a 
.dup.


More information about the Digitalmars-d-learn mailing list