Add sugar to print empty line in printBinaryInformation
authorBerk Hess <hess@kth.se>
Mon, 22 Jun 2015 12:03:39 +0000 (14:03 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 24 Jun 2015 15:36:17 +0000 (17:36 +0200)
The binary information print was missing a prefix and suffix
on an empty line which caused invalid xvg file formatting.

Change-Id: I8faa76502fc44ebd698387e4ab0f85f1473be710

src/gromacs/gmxlib/copyrite.cpp

index 97720b65133d8d495eb6a94086e578613bf28963..642f56c84ca600d0a4bcf8e9d72c7c033d3d6aef 100644 (file)
@@ -821,7 +821,7 @@ void printBinaryInformation(FILE                            *fp,
     const int   indent
         = centeringOffset(78 - strlen(prefix) - strlen(suffix), title.length()) + 1;
     fprintf(fp, "%s%*c%s%s\n", prefix, indent, ' ', title.c_str(), suffix);
-    fprintf(fp, "\n");
+    fprintf(fp, "%s%s\n", prefix, suffix);
     if (settings.bCopyright_)
     {
         GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',