[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 --- Comment #9 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/497c463e100c690e750c28e8918f7f785fd4a4f1 Merge pull request #2794 from rainers/issue13856 --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 Dmitry Olshansky changed: What|Removed |Added Status|NEW |RESOLVED CC||dmitry.o...@gmail.com Resolution|--- |FIXED --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 --- Comment #8 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/497c463e100c690e750c28e8918f7f785fd4a4f1 Merge pull request #2794 from rainers/issue13856 Fix Issue 13856 - std.stdio.readln stomps arrays --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #7 from Steven Schveighoffer --- (In reply to Martin Nowak from comment #5) > As an intermediate replacement it is possible to use byLine. Not really. readln does not do the same thing as byLine. I don't know how you would use byline instead of readln in the OP code. byLine is not really meant to be a "read a line here or there" type of operation, it's meant to exhaust the stream a line at a time. --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 --- Comment #6 from Ali Cehreli --- Both of the bugs that are marked as duplicates of this one use byLine. (However, bug 14005 seems to be cured at this time.) Ali --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #5 from Martin Nowak --- As an intermediate replacement it is possible to use byLine. --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 Martin Krejcirik changed: What|Removed |Added CC||m...@krej.cz --- Comment #4 from Martin Krejcirik --- *** Issue 14310 has been marked as a duplicate of this issue. *** --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 ag0ae...@gmail.com changed: What|Removed |Added CC||acehr...@yahoo.com --- Comment #3 from ag0ae...@gmail.com --- *** Issue 14005 has been marked as a duplicate of this issue. *** --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #2 from Rainer Schuetze --- https://github.com/D-Programming-Language/phobos/pull/2794 --
[Issue 13856] std.stdio.readln stomps arrays
https://issues.dlang.org/show_bug.cgi?id=13856 --- Comment #1 from Rainer Schuetze --- This shows that the current implementation also adds an unnecesary allocation when supplying stack allocated arrays as an initial buffer. void main() { std.file.write("testread", "abcd\n"); File f = File("testread", "rb"); char[100] buf; ln = buf[]; f.readln(ln); assert(ln.ptr == buf.ptr); } --