summaryrefslogtreecommitdiffstats
path: root/libcxx/include/istream
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-12-20 15:40:28 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-12-20 15:40:28 +0000
commit3b42bdd58ae3c5ea61afe2f13adbb216ef79dd65 (patch)
tree03ed3790698404e0282523254c2e77fee6b5e831 /libcxx/include/istream
parent19e8b7ecba3c928b8dbb1f4502d506f167c27539 (diff)
downloadbcm5719-llvm-3b42bdd58ae3c5ea61afe2f13adbb216ef79dd65.tar.gz
bcm5719-llvm-3b42bdd58ae3c5ea61afe2f13adbb216ef79dd65.zip
Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670.
llvm-svn: 170703
Diffstat (limited to 'libcxx/include/istream')
-rw-r--r--libcxx/include/istream1
1 files changed, 1 insertions, 0 deletions
diff --git a/libcxx/include/istream b/libcxx/include/istream
index dc1c52be639..3979e140706 100644
--- a/libcxx/include/istream
+++ b/libcxx/include/istream
@@ -1243,6 +1243,7 @@ template<class _CharT, class _Traits>
streamsize
basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
{
+ __gc_ = 0;
streamsize __c = this->rdbuf()->in_avail();
switch (__c)
{
OpenPOWER on IntegriCloud