Salome HOME
On the fly
[tools/medcoupling.git] / src / MEDLoader / MEDLoaderBase.cxx
index 13db3d9d9648a47cd89c35692a845316e0f4dde5..b83d8a84ec82ee07a8c531581488ed72906672e4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -177,7 +177,8 @@ void MEDLoaderBase::safeStrCpy2(const char *src, int maxLgth, char *dest, int be
           return ;
         }
     }
-  int n=strlen(src);
+  int n(strlen(src));
+  std::fill(dest,dest+maxLgth,' ');
   strncpy(dest,src,n);
 }