From 339c1274a943f721af8b9f36c89bc2796b95bc9b Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 28 Nov 2005 13:21:38 +0000 Subject: [PATCH] Another fix in extraRecordData handling --- src/srw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 1.7.10.4