]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(endl): Fix bug in last change.
authorUlrich Drepper <drepper@gcc.gnu.org>
Wed, 24 May 2000 07:06:07 +0000 (07:06 +0000)
committerUlrich Drepper <drepper@gcc.gnu.org>
Wed, 24 May 2000 07:06:07 +0000 (07:06 +0000)
(ends): Make same change as for endl.

From-SVN: r34128

libio/iostream.cc

index cabda6bfede1ac0953f945a2c4b7016c675240cf..31fafcb5dc9acff992387426fe12107af5db37ae 100644 (file)
@@ -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;
 }