summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5sImp.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5sImp.c')
-rw-r--r--java/src/jni/h5sImp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c
index c578ab8..10f69eb 100644
--- a/java/src/jni/h5sImp.c
+++ b/java/src/jni/h5sImp.c
@@ -1206,8 +1206,8 @@ Java_hdf_hdf5lib_H5_H5Sencode
if (status < 0) {
h5libraryError(env);
} /* end else if */
- else if (buf_size < 0) {
- h5badArgument(env, "H5Sencode: buf_size < 0");
+ else if (buf_size == 0) {
+ h5badArgument(env, "H5Sencode: buf_size = 0");
} /* end if */
else {
bufPtr = (unsigned char*)HDcalloc((size_t) 1, buf_size);