From: Adam Dickmeiss Date: Fri, 29 Apr 2005 10:54:45 +0000 (+0000) Subject: Return diagnostic "Scan: unsupported value of position-in-response" X-Git-Tag: snippet.version.1~61 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=e6297b9f1d2e5c0c551760b3499531a92ef4688f;p=idzebra-moved-to-github.git Return diagnostic "Scan: unsupported value of position-in-response" also if position > num. --- diff --git a/index/zrpn.c b/index/zrpn.c index eb01266..87190e1 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.181 2005-04-29 10:37:12 adam Exp $ +/* $Id: zrpn.c,v 1.182 2005-04-29 10:54:45 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -2818,7 +2818,7 @@ ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, return ZEBRA_OK; } /* prepare dictionary scanning */ - if (pos <= 0) + if (pos < 1 || pos > num) { zh->errCode = YAZ_BIB1_SCAN_UNSUPP_VALUE_OF_POSITION_IN_RESPONSE; *num_entries = 0;