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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165884 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
999fc97ef2
commit
1c0be3864a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user