/* This file is part of the Zebra server.
- Copyright (C) 1994-2009 Index Data
+ Copyright (C) 1994-2011 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
/* converts data1 tree to ISO2709/MARC record */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <assert.h>
#include <stdlib.h>
#include <string.h>
}
*len += n->u.data.len;
}
- if (n->which == DATA1N_tag)
+ if (n->which == DATA1N_tag && *len == 0)
n = n->child;
else if (n->which == DATA1N_data)
n = n->next;