Commit a688950c7d156af58290b7fc1c05776ce23f2f9b
1 parent
2097dd82
fixed a bug introduced when fixing the previous memory leak
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
stim/envi/agilent_binary.h
@@ -127,10 +127,9 @@ public: | @@ -127,10 +127,9 @@ public: | ||
127 | 127 | ||
128 | infile.seekg(header, std::ios::beg); //seek to the start of the data | 128 | infile.seekg(header, std::ios::beg); //seek to the start of the data |
129 | 129 | ||
130 | - alloc(x, y, z); | ||
131 | - //ptr = (T*)malloc(bytes()); //allocate space for the data | 130 | + alloc(x, y, z); //allocate the data |
132 | infile.read((char*)ptr, bytes()); //read the data | 131 | infile.read((char*)ptr, bytes()); //read the data |
133 | - infile.close(); | 132 | + infile.close(); //close the file |
134 | Z[0] = 1; | 133 | Z[0] = 1; |
135 | Z[1] = (double)R[2]; | 134 | Z[1] = (double)R[2]; |
136 | } | 135 | } |