X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_marc.c;fp=retrieval%2Fd1_marc.c;h=fc0127ae35fb89c790570886b0626cab489ed2c4;hb=751fc8b0c5b555a41feb9d8c0bf8ac71d5707d25;hp=75acbb92109804b89d1d0db5601b3003937ed026;hpb=c3b984a6d1cf19b1731b7e783ae2c0fd539277ac;p=yaz-moved-to-github.git diff --git a/retrieval/d1_marc.c b/retrieval/d1_marc.c index 75acbb9..fc0127a 100644 --- a/retrieval/d1_marc.c +++ b/retrieval/d1_marc.c @@ -3,7 +3,7 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Id: d1_marc.c,v 1.19 2002-05-28 21:09:44 adam Exp $ + * $Id: d1_marc.c,v 1.20 2002-07-03 14:09:34 adam Exp $ */ @@ -205,6 +205,7 @@ static int nodetomarc(data1_marctab *p, data1_node *n, int selected, data1_node *field, *subf; yaz_log (LOG_DEBUG, "nodetomarc"); + for (field = n->child; field; field = field->next) { int is00X = 0; @@ -327,6 +328,9 @@ char *data1_nodetomarc(data1_handle dh, data1_marctab *p, data1_node *n, int *size; char **buf = data1_get_map_buf (dh, &size); + n = data1_get_root_tag (dh, n); + if (!n) + return 0; *len = nodetomarc(p, n, selected, buf, size); return *buf; }