From: Ulrich Drepper Date: Wed, 24 May 2000 07:06:07 +0000 (+0000) Subject: (endl): Fix bug in last change. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d027507ed8f21aae9fc2c97d766b05d57b3e3cbc;p=gcc.git (endl): Fix bug in last change. (ends): Make same change as for endl. From-SVN: r34128 --- 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; }