Incorrect behavior of istream::get() with egcs-1.0.2
H. J. Lu
hjl@freya.yggdrasil.com
Fri Apr 3 21:11:00 GMT 1998
Hi,
Oops. That is my fault. My network is down. I think this patch should
fix it.
Thanks.
--
H.J. Lu (hjl@gnu.org)
----
Thu Apr 2 08:11:02 1998 H.J. Lu (hjl@gnu.org)
* isgetline.cc (istream::get): Fix a typo.
--- isgetline.cc.orig Thu Apr 2 13:55:09 1998
+++ isgetline.cc Thu Apr 2 13:58:56 1998
@@ -69,11 +69,9 @@
{
streambuf *sbuf = rdbuf();
int ch;
- long count = _IO_getline_info(sbuf, buf, len - 1, delim, -1, &ch);
+ _gcount = _IO_getline_info(sbuf, buf, len - 1, delim, -1, &ch);
if (_gcount == 0 && ch == EOF)
set(ios::failbit|ios::eofbit);
- else
- _gcount = count;
}
buf[_gcount] = '\0';
return *this;
More information about the Gcc-bugs
mailing list