summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/big.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/big.c b/test/big.c
index 5a70c26..831a2ed 100644
--- a/test/big.c
+++ b/test/big.c
@@ -435,7 +435,8 @@ writer (char* filename, hid_t fapl, fsizes_t testsize, int wrt_n)
hs_size[0] = WRT_SIZE;
if ((mem_space = H5Screate_simple (1, hs_size, hs_size)) < 0) goto error;
for (i=0; i<wrt_n; i++) {
- hs_start[0] = randll (size2[0], i);
+ /* start position must be at least hs_size from the end */
+ hs_start[0] = randll (size2[0]-hs_size[0], i);
HDfprintf (out, "#%03d 0x%016Hx\n", i, hs_start[0]);
if (H5Sselect_hyperslab (space2, H5S_SELECT_SET, hs_start, NULL,
hs_size, NULL) < 0) goto error;