summaryrefslogtreecommitdiff
path: root/libio/isgetline.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libio/isgetline.cc')
-rw-r--r--libio/isgetline.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/libio/isgetline.cc b/libio/isgetline.cc
index 2a2cd0f58a7..02b34927eb8 100644
--- a/libio/isgetline.cc
+++ b/libio/isgetline.cc
@@ -69,11 +69,9 @@ istream& istream::get(char* buf, int len, char delim)
{
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;