aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/locale_conv.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/locale_conv.h')
-rw-r--r--libstdc++-v3/include/bits/locale_conv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/locale_conv.h b/libstdc++-v3/include/bits/locale_conv.h
index 9b952d45165..47c8dee53cb 100644
--- a/libstdc++-v3/include/bits/locale_conv.h
+++ b/libstdc++-v3/include/bits/locale_conv.h
@@ -375,7 +375,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
protected:
int
sync()
- { return _M_buf && _M_conv_put() && _M_buf->pubsync() ? 0 : -1; }
+ { return _M_buf && _M_conv_put() && !_M_buf->pubsync() ? 0 : -1; }
typename _Wide_streambuf::int_type
overflow(typename _Wide_streambuf::int_type __out)
@@ -482,6 +482,7 @@ _GLIBCXX_END_NAMESPACE_CXX11
{
if (_M_buf->sputn(__p, __n) < __n)
return false;
+ return true;
}
// convert the put area and write to the byte stream buffer