Commit 5b57beda authored by gsell's avatar gsell
Browse files

examples/H5Fed/dump_field_attributes.c:

- bugfix in printing string attributes
parent 222789a1
...@@ -110,15 +110,15 @@ dump_string_attrib ( ...@@ -110,15 +110,15 @@ dump_string_attrib (
const char* const attrib_name, const char* const attrib_name,
h5_size_t attrib_nelems h5_size_t attrib_nelems
) { ) {
char* attrib_data[attrib_nelems]; char attrib_data[attrib_nelems];
H5BlockReadFieldAttribString ( H5BlockReadFieldAttribString (
file, file,
field_name, field_name,
attrib_name, attrib_name,
attrib_data); attrib_data);
printf ("Attribute: '%s'\n", attrib_name); printf ("Attribute: '%s'\n", attrib_name);
printf (" Type: H5_FLOAT32_T\n"); printf (" Type: H5_STRING_T\n");
printf (" Data: %2f", attrib_data[0]); printf (" Data: %s", attrib_data);
} }
void void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment