summaryrefslogtreecommitdiff
blob: 10efa813ba3dd935af38fd62e289c1deae72ea09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 src/lib/libmints/matrix.cc | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/lib/libmints/matrix.cc b/src/lib/libmints/matrix.cc
index 2ce5ede..2c7b5de 100644
--- a/src/lib/libmints/matrix.cc
+++ b/src/lib/libmints/matrix.cc
@@ -549,10 +549,9 @@ void Matrix::save(const char *filename, bool append, bool saveLowerTriangle, boo
     } else {
         out = fopen(filename, "w");
     }
-    
-    fprintf(out, name_.c_str());
-    fprintf(out, "\n");
-    
+
+    fprintf(out, "%s\n", name_.c_str());
+
     if (saveSubBlocks == false) {
         // Convert the matrix to a full matrix
         double **fullblock = to_block_matrix();
@@ -1083,9 +1082,8 @@ void SimpleMatrix::save(const char *filename, bool append, bool saveLowerTriangl
     } else {
         out = fopen(filename, "w");
     }
-    
-    fprintf(out, name_.c_str());
-    fprintf(out, "\n");
+
+    fprintf(out, "%s\n", name_.c_str());
 
     if (saveLowerTriangle) {
         // Count the number of non-zero element