diff options
-rw-r--r-- | tools/h5tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/h5tools.c b/tools/h5tools.c index 5a7b7d2..6f7b421 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -764,8 +764,8 @@ h5dump_sprint(h5dump_str_t *str/*in,out*/, const h5dump_t *info, quote = '\0'; pad = H5Tget_strpad(type); - for (i=0; - i < size && ((pad == H5T_STR_NULLPAD) ? 1 : (cp_vp[i] != '\0')); + for (i = 0; + i < size && (cp_vp[i] != '\0' || pad != H5T_STR_NULLTERM); i++) { int j = 1; |