OSDN Git Service

(endl): Fix bug in last change.
authordrepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 May 2000 07:06:07 +0000 (07:06 +0000)
committerdrepper <drepper@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 May 2000 07:06:07 +0000 (07:06 +0000)
(ends): Make same change as for endl.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34128 138bc75d-0d04-0410-961f-82ee72b054a4

libio/iostream.cc

index cabda6b..31fafcb 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;
 }