summaryrefslogtreecommitdiffstats
path: root/src/H5Tpad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tpad.c')
-rw-r--r--src/H5Tpad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index a4fe620..254831e 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -130,7 +130,7 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only")
- if (lsb < 0 || lsb >= H5T_NPAD || msb < 0 || msb >= H5T_NPAD)
+ if (lsb < H5T_PAD_ZERO || lsb >= H5T_NPAD || msb < H5T_PAD_ZERO || msb >= H5T_NPAD)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type")
if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined")