summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 5431e21..21913cd 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -4930,7 +4930,8 @@ xml_print_strs(hid_t did, int source)
for (i = 0; i < ssiz; i++) {
if(is_vlstr) {
onestring = *(char **)bp;
- str_size = (size_t)strlen(onestring);
+ if(onestring)
+ str_size = (size_t)strlen(onestring);
} else {
strncpy(onestring, bp, tsiz);
str_size = tsiz;
@@ -4938,7 +4939,7 @@ xml_print_strs(hid_t did, int source)
indentation(indent + COL);
if (!onestring) {
- printf("\"%s\"\n", "NULL");
+ printf("NULL\n");
} else {
char *t_onestring = xml_escape_the_string(onestring, (int)str_size);