From 3293e213ce4d4b3dfce23972fc1996cdfb19f584 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Mon, 6 Nov 2000 19:27:03 -0500 Subject: [svn-r2804] Purpose: Bug Fix Description: Selections in 1-D dataspaces would get into an infinite loop in H5S_hyper_select_iterate_mem_opt (called by H5Diterate and H5Dget_vlen_buf_size) due to some incorrect logic. Solution: Handled 1-D cases correctly and get out of loop. Platforms tested: Eyeballed... --- src/H5Shyper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index a9c247f..94bf5d6 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -5221,6 +5221,10 @@ H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t UNUSED *iter, void *buf, hid_t t tmp_count[fast_dim]--; } /* end while */ + /* Check for getting out of iterator, we're done in the 1-D case */ + if(ndims==1) + goto done; /* Yes, an evil goto.. :-) -QAK */ + /* Work on other dimensions if necessary */ if(fast_dim>0 && user_ret==0) { /* Reset the sequence and block counts */ -- cgit v0.12