digitalmars.D.bugs - Stream.readf bug
- Ivan Senji <ivan.senji_REMOVE_ _THIS__gmail.com> Oct 24 2005
- "Ben Hinkle" <ben.hinkle gmail.com> Oct 24 2005
int d;
MemoryStream s = new MemoryStream("5");
s.readf("%d",&d);
writefln("d==",d);
prints: d==0
Works if number has more than one digit.
Oct 24 2005
"Ivan Senji" <ivan.senji_REMOVE_ _THIS__gmail.com> wrote in message news:djjkg9$1kds$1 digitaldaemon.com...int d; MemoryStream s = new MemoryStream("5"); s.readf("%d",&d); writefln("d==",d); prints: d==0 Works if number has more than one digit.
looking at the std.stream code I suspect it will be fixed by changing line 684 !eof() to (c != char.init)
Oct 24 2005








"Ben Hinkle" <ben.hinkle gmail.com>