diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2017-08-04 14:03:39 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2017-08-04 14:03:39 (GMT) |
commit | bc2bc80be9c11ba1d1a8f83341266fa601e9b613 (patch) | |
tree | ba3a115502413ef0d33a7539cb18baa6700fc46b /tools/lib | |
parent | 51b97cc02d39ae7f05b129463087ef13a97a2822 (diff) | |
parent | ad1570276a67d422a4f6eff6e54a04f51fb0bd3b (diff) | |
download | hdf5-bc2bc80be9c11ba1d1a8f83341266fa601e9b613.zip hdf5-bc2bc80be9c11ba1d1a8f83341266fa601e9b613.tar.gz hdf5-bc2bc80be9c11ba1d1a8f83341266fa601e9b613.tar.bz2 |
Merge branch 'hdf5_1_8' of ssh://bitbucket.hdfgroup.org:7999/~brtnfld/hdf5_msb into hdf5_1_8
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff_array.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 1b17382..6480cf6 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -674,21 +674,33 @@ static hsize_t diff_datum(void *_mem1, h5difftrace("diff_datum H5T_STRING variable\n"); /* Get pointer to first string */ s1 = *(char**) mem1; - size1 = HDstrlen(s1); + if(s1) + size1 = HDstrlen(s1); + else + size1 = 0; /* Get pointer to second string */ s2 = *(char**) mem2; - size2 = HDstrlen(s2); + if(s2) + size2 = HDstrlen(s2); + else + size2 = 0; } else if (H5T_STR_NULLTERM == pad) { h5difftrace("diff_datum H5T_STRING null term\n"); /* Get pointer to first string */ s1 = (char*) mem1; - size1 = HDstrlen(s1); + if(s1) + size1 = HDstrlen(s1); + else + size1 = 0; if (size1 > size_mtype) size1 = size_mtype; /* Get pointer to second string */ s2 = (char*) mem2; - size2 = HDstrlen(s2); + if(s2) + size2 = HDstrlen(s2); + else + size2 = 0; if (size2 > size_mtype) size2 = size_mtype; } |