Skip to content
Commit 2eb7f433 authored by Volodymyr Sapsai's avatar Volodymyr Sapsai
Browse files

[libcxx] Make std::basic_istream::getline 0-terminate input array in case of error.

It covers the cases when the sentry object returns false and when an exception
was thrown. Corresponding standard paragraph is C++14 [istream.unformatted]p21:
  In any case, if n is greater than zero, it then stores a null character
  (using charT()) into the next successive location of the array.

Patch by Reimar Döffinger.

llvm-svn: 318862
parent b0229564
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment