From d027507ed8f21aae9fc2c97d766b05d57b3e3cbc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 24 May 2000 07:06:07 +0000 Subject: [PATCH] (endl): Fix bug in last change. (ends): Make same change as for endl. From-SVN: r34128 --- libio/iostream.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libio/iostream.cc b/libio/iostream.cc index cabda6bfede..31fafcb5dc9 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; } -- 2.30.2