aboutsummaryrefslogtreecommitdiffstats
path: root/include/istream
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:30 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:52:30 +0000
commit243a6be085fe6a7ce49169864c68a8839735e49b (patch)
treeabfecf3c23dc7512ca48e72ac418b149c865e0f3 /include/istream
parent1147845301c03308e3419b89c28c77bb6917fe04 (diff)
downloadsrc-vendor/libc++.tar.gz
src-vendor/libc++.zip
Vendor import of stripped libc++ trunk r375505, the last commit beforevendor/libc++/libc++-trunk-r375505vendor/libc++
the upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/libcxx/trunk@375505
Notes
Notes: svn path=/vendor/libc++/dist/; revision=353946 svn path=/vendor/libc++/libc++-r375505/; revision=353947; tag=vendor/libc++/libc++-trunk-r375505
Diffstat (limited to 'include/istream')
-rw-r--r--include/istream2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/istream b/include/istream
index d6217bbb8009..bfbe5f24728e 100644
--- a/include/istream
+++ b/include/istream
@@ -1619,7 +1619,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
__is.rdbuf()->sbumpc();
}
__x = bitset<_Size>(__str);
- if (__c == 0)
+ if (_Size > 0 && __c == 0)
__state |= ios_base::failbit;
#ifndef _LIBCPP_NO_EXCEPTIONS
}