From c26a0bc516d9e8e72e8301df074e025a2b4a10aa Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Mon, 19 May 2003 15:11:45 -0500 Subject: [svn-r6903] Purpose: bug fix Description: when the list attribute function was called with values of type reference, the format string was not initialized causing a segmentation fault on printf Solution: initialized the string ( with obj no and file no turned on ) Platforms tested: Windows 2000 (octopus) Linux 2.4 (rockaway) SunOS 5.7 (arabica) IRIX 6.5 (modi4) Misc. update: --- tools/h5ls/h5ls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 571d80a..f5798df 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1342,6 +1342,9 @@ list_attr (hid_t obj, const char *attr_name, void UNUSED *op_data) info.line_pre = " %s \""; info.line_suf = "\""; } + /* values of type reference */ + info.obj_format = "-%lu:%lu:%lu:%lu"; + info.obj_hidefileno = 0; if (hexdump_g) { p_type = H5Tcopy(type); } else { -- cgit v0.12