October 24, 2005 Stream.readf bug | ||||
---|---|---|---|---|
| ||||
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. |
October 24, 2005 Re: Stream.readf bug | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ivan Senji | "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) |
Copyright © 1999-2021 by the D Language Foundation