From 50143446837df6792c0d59042c7c78fd41fa7aa7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 13 Jan 2015 14:12:19 +0100 Subject: [PATCH] record conv: select return org record if no x-path match YAZ-814 --- src/record_conv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]; -- 1.7.10.4