diff options
-rw-r--r-- | c++/test/th5s.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 4c1540e..cfdeb1f 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -188,10 +188,10 @@ static void test_h5s_basic() * If this test fails and the H5S_MAX_RANK variable has changed, follow * the instructions in space_overflow.c for regenating the th5s.h5 file. */ - char *tmp_str = new char[TESTFILE.length()]; + char *tmp_str = new char[TESTFILE.length()+1]; strcpy(tmp_str, TESTFILE.c_str()); const char *testfile = H5_get_srcdir_filename(tmp_str); - delete tmp_str; + delete []tmp_str; // Create file H5File fid1(testfile, H5F_ACC_RDONLY); |