diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2013-03-11 19:53:48 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2013-03-11 19:53:48 +0000 |
| commit | 41801f14eda2860d98d98742d145116ad882c2da (patch) | |
| tree | f2d98fc657408a309fd76a5c8e534c178e4a9b48 | |
| parent | bff7825a5726b99109509cea887dcf82fc788d38 (diff) | |
| download | bcm5719-llvm-41801f14eda2860d98d98742d145116ad882c2da.tar.gz bcm5719-llvm-41801f14eda2860d98d98742d145116ad882c2da.zip | |
This SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin. Added. I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin. The current testsuite setup does not have a way a good way to test std::cin.
llvm-svn: 176822
| -rw-r--r-- | libcxx/include/__std_stream | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/__std_stream b/libcxx/include/__std_stream index e562e2c4730..fa194ea8ce2 100644 --- a/libcxx/include/__std_stream +++ b/libcxx/include/__std_stream @@ -150,7 +150,7 @@ __stdinbuf<_CharT>::__getchar(bool __consume) { for (int __i = __nread; __i > 0;) { - if (ungetc(__extbuf[--__i], __file_) == EOF) + if (ungetc(traits_type::to_int_type(__extbuf[--__i]), __file_) == EOF) return traits_type::eof(); } } |

