diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-08-01 11:12:03 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-08-01 11:12:03 (GMT) |
commit | fd0d8738e07c602c1871a5052b4fe836c37b8d64 (patch) | |
tree | e4bbe74c8732b589e92085af502a990cf7316d8c /tools/lib/h5diff_array.c | |
parent | 274f71be174c431be6e94b1d4f4c100ff090e749 (diff) | |
parent | 823f6a133302f1d6ba904020ad092723d2657d02 (diff) | |
download | hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.zip hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.tar.gz hdf5-fd0d8738e07c602c1871a5052b4fe836c37b8d64.tar.bz2 |
Merge branch 'develop' into h5pl_commit
Diffstat (limited to 'tools/lib/h5diff_array.c')
-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 0b1a96e..7236ad1 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -673,21 +673,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; } |