summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-29 03:28:58 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2016-04-29 03:28:58 (GMT)
commit6669ffd362147ec5459b0fc09cb14a0bbb13813c (patch)
tree06d2d1944e0857ec0da141495d46e7de8ec28c46 /c++
parent400a86b89dedcc6c9d188bd9e66f48fb1db134b6 (diff)
downloadhdf5-6669ffd362147ec5459b0fc09cb14a0bbb13813c.zip
hdf5-6669ffd362147ec5459b0fc09cb14a0bbb13813c.tar.gz
hdf5-6669ffd362147ec5459b0fc09cb14a0bbb13813c.tar.bz2
[svn-r29835] Purpose: Fix bug
Description: A typo in an array allocation caused mismatch of new/delete. Fixed. Platforms tested: Linux/32 2.6 (jam) Linux/64 (platypus) Darwin (osx1010test)
Diffstat (limited to 'c++')
-rw-r--r--c++/test/tarray.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/test/tarray.cpp b/c++/test/tarray.cpp
index 441ef81..fb7a5fc 100644
--- a/c++/test/tarray.cpp
+++ b/c++/test/tarray.cpp
@@ -298,8 +298,8 @@ static void test_array_compound_array()
*/
H5::DataType getArr()
{
- hsize_t *dims = new hsize_t;
- *dims = 5;
+ hsize_t *dims = new hsize_t[1];
+ dims[0] = 5;
H5::ArrayType ret;
ret = H5::ArrayType(H5::PredType::NATIVE_INT, 1, dims);
delete[] dims;