summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_attribute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c
index 6857236..96fdd63 100644
--- a/examples/h5_attribute.c
+++ b/examples/h5_attribute.c
@@ -188,11 +188,11 @@ main (void)
/*
* Attach to the string attribute using its index, then read and display the value.
*/
- attr = H5Aopen_idx(dataset, 2);
+ attr = H5Aopen_idx(dataset, 1);
atype = H5Tcopy(H5T_C_S1);
H5Tset_size(atype, 5);
ret = H5Aread(attr, atype, string_out);
- printf("The value of the attribute with index 2 is %s \n", string_out);
+ printf("The value of the attribute with index 1 is %s \n", string_out);
ret = H5Aclose(attr);
ret = H5Tclose(atype);