diff options
Diffstat (limited to 'src/H5Tstrpad.c')
-rw-r--r-- | src/H5Tstrpad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c index c764a75..c79b60d 100644 --- a/src/H5Tstrpad.c +++ b/src/H5Tstrpad.c @@ -146,7 +146,7 @@ H5Tset_strpad(hid_t type_id, H5T_str_t strpad) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype") if (H5T_STATE_TRANSIENT!=dt->shared->state) HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only") - if (strpad < 0 || strpad >= H5T_NSTR) + if (strpad < H5T_STR_NULLTERM || strpad >= H5T_NSTR) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal string pad type") while (dt->shared->parent && !H5T_IS_STRING(dt->shared)) dt = dt->shared->parent; /*defer to parent*/ |