From: Adam Dickmeiss Date: Mon, 28 Nov 2005 13:21:38 +0000 (+0000) Subject: Another fix in extraRecordData handling X-Git-Tag: YAZ.2.1.10~4 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=339c1274a943f721af8b9f36c89bc2796b95bc9b Another fix in extraRecordData handling --- diff --git a/src/srw.c b/src/srw.c index 47718b4..f0dd142 100644 --- a/src/srw.c +++ b/src/srw.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: srw.c,v 1.40 2005-11-11 22:07:11 adam Exp $ + * $Id: srw.c,v 1.41 2005-11-28 13:21:38 adam Exp $ */ /** * \file srw.c @@ -321,7 +321,7 @@ static int yaz_srw_record(ODR o, xmlNodePtr pptr, Z_SRW_record *rec, } if (rec->recordPosition) add_xsd_integer(ptr, "recordPosition", rec->recordPosition ); - if (*extra) + if (extra && *extra) { xmlNodePtr rptr = xmlNewChild(ptr, 0, BAD_CAST "extraRecordData", 0); @@ -367,7 +367,8 @@ static int yaz_srw_records(ODR o, xmlNodePtr pptr, Z_SRW_record **recs, { xmlNodePtr rptr = xmlNewChild(pptr, 0, BAD_CAST "record", 0); - yaz_srw_record(o, rptr, (*recs)+i, *extra + i, client_data, ns); + yaz_srw_record(o, rptr, (*recs)+i, (*extra ? *extra + i : 0), + client_data, ns); } } return 0;