aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/iostream.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libio/iostream.cc b/libio/iostream.cc
index cabda6b..31fafcb 100644
--- a/libio/iostream.cc
+++ b/libio/iostream.cc
@@ -957,13 +957,14 @@ int istream::_skip_ws()
ostream& ends(ostream& outs)
{
- outs.put('\0');
+ if (outs.opfx())
+ outs.put('\0');
return outs;
}
ostream& endl(ostream& outs)
{
- if (opfx)
+ if (outs.opfx())
flush(outs.put('\n'));
return outs;
}