X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Frecord_conv.c;h=a74b4c55a6f0753d00f8eb8d765f2c7c41be7885;hb=20c28e99eaa71d4b73e8c03c8cfaf23653948da7;hp=2fbe98698d2f933d01ff0aac4a09c4ff93f1b767;hpb=8cb8947e3a7bff4dbf8f124871cb4905df1adce7;p=yaz-moved-to-github.git 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];