From 0d3944c157baf45465880ccbd72c04945062832d Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Sat, 6 Jan 2007 03:02:47 +0000 Subject: [PATCH] Added check to prevent retrieval of more than global_parameters.toget recs --- src/pazpar2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pazpar2.c b/src/pazpar2.c index cb6a384..fa2d51f 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.15 2007-01-05 20:33:05 adam Exp $ */; +/* $Id: pazpar2.c,v 1.16 2007-01-06 03:02:47 quinn Exp $ */; #include #include @@ -199,6 +199,8 @@ static void send_present(IOCHAN i) int start = cl->records + 1; toget = global_parameters.chunk; + if (toget > global_parameters.toget - cl->records) + toget = global_parameters.toget - cl->records; if (toget > cl->hits - cl->records) toget = cl->hits - cl->records; -- 1.7.10.4