diff --git a/src/math/FGStateSpace.cpp b/src/math/FGStateSpace.cpp
index edfbffa17a240ad861757533f371122889607894..15241927eb90139905c8a8fdfa8abeaeae34cf55 100644
--- a/src/math/FGStateSpace.cpp
+++ b/src/math/FGStateSpace.cpp
@@ -140,7 +140,7 @@ std::ostream &operator<<( std::ostream &out, const std::vector< std::vector<doub
             }
             else out << ",";
         }
-        out << std::ends;
+        out << std::flush;
     }
 }
 
@@ -157,7 +157,7 @@ std::ostream &operator<<( std::ostream &out, const std::vector<double> &vec )
         if ( i==nI-1 ) out << "]";
         else out <<  ";\n";
     }
-	out << std::ends;
+    out << std::flush;
 }