http://d.puremagic.com/issues/show_bug.cgi?id=5492

           Summary: immutable string can be changed by stdin.readln
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r <mrmoc...@gmx.de> 2011-01-26 12:50:13 PST ---
import std.stdio;

void main()
{
    immutable char[] buf = "hello";
    writefln("buf = %s",buf);
    stdin.readln(buf);
    writefln("buf = %s",buf);
}

compiles and runs without errors.
Steven said it segfaults on Linux.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to