[cfe-commits] [libcxx] r165884 - /libcxx/trunk/include/streambuf

Howard Hinnant hhinnant at apple.com
Sat Oct 13 12:31:51 PDT 2012


Author: hhinnant
Date: Sat Oct 13 14:31:51 2012
New Revision: 165884

URL: http://llvm.org/viewvc/llvm-project?rev=165884&view=rev
Log:
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.

Modified:
    libcxx/trunk/include/streambuf

Modified: libcxx/trunk/include/streambuf
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/streambuf?rev=165884&r1=165883&r2=165884&view=diff
==============================================================================
--- libcxx/trunk/include/streambuf (original)
+++ libcxx/trunk/include/streambuf Sat Oct 13 14:31:51 2012
@@ -540,7 +540,7 @@
     {
         if (__nout_ < __eout_)
             *__nout_++ = *__s;
-        else if (overflow(*__s) == __eof)
+        else if (overflow(traits_type::to_int_type(*__s)) == __eof)
             break;
     }
     return __i;





More information about the cfe-commits mailing list