Quoting Corey Bettenhausen <[email protected]>:

Howdy,
When fetching a string attribute using h5ltget_attribute_string_f(), the string returned seems to be a C string i.e null terminated, even when using the Fortran interface. Thus, one could set an attribute of length 10 and immediately read it and get an 11-character string (to accommodate the null character). Do ya'll consider this a bug? Any chance at nipping off that null character before returning?

Yes, the NULL termination should be removed before returning the string (the Fortran string will be blank padded if needed). *I think* all the other HL fortran APIs which return a string remove the null termination (the Fortran HL DS APIs definitely do).

Thanks for pointing this out.



_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to