From: Adam Dickmeiss Date: Tue, 13 Jan 2015 13:12:19 +0000 (+0100) Subject: record conv: select return org record if no x-path match YAZ-814 X-Git-Tag: v5.8.1~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=50143446837df6792c0d59042c7c78fd41fa7aa7;p=yaz-moved-to-github.git record conv: select return org record if no x-path match YAZ-814 --- diff --git a/src/record_conv.c b/src/record_conv.c index 2fbe986..a74b4c5 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -378,10 +378,11 @@ static int convert_select(void *vinfo, WRBUF record, WRBUF wr_error) if (xpathObj) { xmlNodeSetPtr nodes = xpathObj->nodesetval; - wrbuf_rewind(record); if (nodes) { int i; + if (nodes->nodeNr > 0) + wrbuf_rewind(record); for (i = 0; i < nodes->nodeNr; i++) { xmlNode *ptr = nodes->nodeTab[i];