diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-10-13 19:31:51 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-10-13 19:31:51 +0000 |
commit | 6758190507b1c6d24c122db9c7f345e1685176bb (patch) | |
tree | ff7aca3a3b4b24a1d5979e76c13da39aa70fbbec | |
parent | c33e98ca0509ff2587818d6c0732f70fc6d03237 (diff) | |
download | bcm5719-llvm-6758190507b1c6d24c122db9c7f345e1685176bb.tar.gz bcm5719-llvm-6758190507b1c6d24c122db9c7f345e1685176bb.zip |
Use traits_type::to_int_type in basic_streambuf<_CharT, _Traits>::xsputn when calling overflow to correctly handle negative signed character types. This fixes http://llvm.org/bugs/show_bug.cgi?id=14074.
llvm-svn: 165884
-rw-r--r-- | libcxx/include/streambuf | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/streambuf b/libcxx/include/streambuf index e128be5d59c..e34ad23eb72 100644 --- a/libcxx/include/streambuf +++ b/libcxx/include/streambuf @@ -540,7 +540,7 @@ basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n) { if (__nout_ < __eout_) *__nout_++ = *__s; - else if (overflow(*__s) == __eof) + else if (overflow(traits_type::to_int_type(*__s)) == __eof) break; } return __i; |