From c9a42d334f292b889d643cf80f6b330c051a9597 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 28 Dec 2007 10:29:40 +0000 Subject: [PATCH] Fixed zebra_recid_to_sysno for parameter no_sysnos. Fixed zebra_recid_to_sysno for parameter no_sysnos so that it is never set to a higher value than the original passed value (which servers as maximum number of sysnos to be returned - presumably size of sysnos array. --- index/zsets.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index/zsets.c b/index/zsets.c index 8e48132..ac5177c 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -1,4 +1,4 @@ -/* $Id: zsets.c,v 1.130 2007-12-19 14:11:36 adam Exp $ +/* $Id: zsets.c,v 1.131 2007-12-28 10:29:40 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -1367,11 +1367,9 @@ static ZEBRA_RES zebra_recid_to_sysno(ZebraHandle zh, while (r && key_found.mem[0] == recid) { if (sysnos_offset < *no_sysnos) - sysnos[sysnos_offset] = + sysnos[sysnos_offset++] = key_found.mem[key_found.len-1]; - r = isamb_pp_read(pt, &key_found); - sysnos_offset++; } isamb_pp_close(pt); } -- 1.7.10.4