Fix bug #3405: Extra data in MARC after conv
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 29 Jun 2010 09:24:42 +0000 (11:24 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 29 Jun 2010 09:24:42 +0000 (11:24 +0200)
data1/d1_marc.c

index 839eee9..22bb78d 100644 (file)
@@ -189,7 +189,7 @@ static void get_data2(data1_node *n, int *len, char *dst, size_t max)
             }
             *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;