diff options
author | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-06-10 19:14:40 (GMT) |
---|---|---|
committer | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-06-10 19:14:40 (GMT) |
commit | 0780cc508e4311a1d8c9a5f1dc4c7c2eaa8a8c28 (patch) | |
tree | c5bcff9cd9ab287598b70924ece144a90f8ea4a7 /tools | |
parent | 40aa67003b0f8815808e17dc7b0568bf00632924 (diff) | |
download | hdf5-0780cc508e4311a1d8c9a5f1dc4c7c2eaa8a8c28.zip hdf5-0780cc508e4311a1d8c9a5f1dc4c7c2eaa8a8c28.tar.gz hdf5-0780cc508e4311a1d8c9a5f1dc4c7c2eaa8a8c28.tar.bz2 |
[svn-r1325] fixed a bug that was due to settign the dim_n_size wrong for the dump_attr function
for scalar data
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5tools.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/h5tools.c b/tools/h5tools.c index 8bff61a..7b6f51d 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -2409,7 +2409,7 @@ int copy_atomic_char(char* output, char* input, int numchar, int freespace){ (input[x+1] == 't')){ /*escape characters*/ strncat(output,input,2); x += 2; - freespace - 2; + freespace = freespace - 2; } else { /* octal number */ if (freespace < 4){ @@ -2418,7 +2418,7 @@ int copy_atomic_char(char* output, char* input, int numchar, int freespace){ else { strncat(output,input,4); x += 4; - freespace - 4; + freespace = freespace - 4; } } } @@ -2466,6 +2466,10 @@ int h5dump_attr(hid_t oid, hid_t p_type){ for (i = 0; i < ndims; i++){ nelmts *= size[i]; } + dim_n_size = size[ndims - 1]; + } + else { + dim_n_size = 1; } need = nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)); sm_buf = malloc(need); |