From 291534d6ba703c3ca522d9324ddfe01eb3330f8d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 4 Jun 2014 11:15:18 +0200 Subject: [PATCH] fix zoom+memcahced: present request out of range YAZ-767 --- src/zoom-z3950.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/zoom-z3950.c b/src/zoom-z3950.c index 63202f3..67a6b47 100644 --- a/src/zoom-z3950.c +++ b/src/zoom-z3950.c @@ -1577,9 +1577,10 @@ zoom_ret ZOOM_connection_Z3950_search(ZOOM_connection c) if (resultset->live_set) { - if (*start + *count > resultset->size) - ZOOM_set_dset_error(c, YAZ_BIB1_PRESENT_REQUEST_OUT_OF_RANGE, "Bib-1", - 0, 0); + if (*start >= resultset->size) + *count = 0; + else if (*start + *count >= resultset->size) + *count = resultset->size - *start; } if (c->error) /* don't continue on error */ -- 1.7.10.4