mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-30 07:14:09 +08:00
fstream.tcc (_M_convert_to_external): Set __elen to zero if codecvt::out eventually fails.
2003-03-07 Paolo Carlini <pcarlini@unitus.it> * include/bits/fstream.tcc (_M_convert_to_external): Set __elen to zero if codecvt::out eventually fails. From-SVN: r63954
This commit is contained in:
parent
1deba98bd2
commit
9a97e40ae1
@ -1,3 +1,8 @@
|
||||
2003-03-07 Paolo Carlini <pcarlini@unitus.it>
|
||||
|
||||
* include/bits/fstream.tcc (_M_convert_to_external):
|
||||
Set __elen to zero if codecvt::out eventually fails.
|
||||
|
||||
2003-03-07 Paolo Carlini <pcarlini@unitus.it>
|
||||
|
||||
PR libstdc++/9182
|
||||
|
@ -320,8 +320,13 @@ namespace std
|
||||
__iend, __buf, __buf + __blen, __bend);
|
||||
if (__r != codecvt_base::error)
|
||||
__rlen = __bend - __buf;
|
||||
else
|
||||
__rlen = 0;
|
||||
else
|
||||
{
|
||||
__rlen = 0;
|
||||
// Signal to the caller (_M_really_overflow) that
|
||||
// codecvt::out eventually failed.
|
||||
__elen = 0;
|
||||
}
|
||||
if (__rlen)
|
||||
{
|
||||
__elen += _M_file.xsputn(__buf, __rlen);
|
||||
|
Loading…
Reference in New Issue
Block a user