From 4c1c4df443dc34e0a183de4760a2890396409bb8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 16 Nov 1998 10:10:53 +0000 Subject: [PATCH] Fixed problem with zebraPosSetCreate that occurred when positions were less than 1. --- index/zsets.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index/zsets.c b/index/zsets.c index 0935fe1..ed5e1a6 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -4,7 +4,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: zsets.c,v $ - * Revision 1.19 1998-09-22 10:48:22 adam + * Revision 1.20 1998-11-16 10:10:53 adam + * Fixed problem with zebraPosSetCreate that occurred when positions were + * less than 1. + * + * Revision 1.19 1998/09/22 10:48:22 adam * Minor changes in search API. * * Revision 1.18 1998/09/22 10:03:45 adam @@ -255,7 +259,7 @@ ZebraPosSet zebraPosSetCreate (ZebraHandle zh, const char *name, for (i = 0; inum_entries) + if (position > 0 && position <= sort_info->num_entries) { logf (LOG_DEBUG, "got pos=%d (sorted)", position); sr[i].sysno = sort_info->entries[position-1]->sysno; -- 1.7.10.4