summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fortran/src/H5Sf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index f37e9c0..a64573e 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -321,7 +321,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
hsize_t c_num_points;
hsize_t c_startpoint,* c_buf;
int rank;
- hsize_t i;
+ hssize_t i;
c_space_id = *space_id;
c_num_points = (hsize_t)* numpoints;
@@ -334,7 +334,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
if (!c_buf) return ret_value;
ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint,
c_num_points, c_buf);
- for (i = c_num_points*rank-1; i >= 0; i--) {
+ for (i = (c_num_points*rank)-1; i >= 0; i--) {
buf[i] = (hsize_t_f)(c_buf[i]+1);
}