X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmarc_read_line.c;h=21371978db54882bfe8312f9552c32c2bb29a6fa;hb=b756b711841bac38e5b69baa51939ca9e1c01adb;hp=739ec861f75178ccbf2d50c5918f2caa3bc8d82d;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c;p=yaz-moved-to-github.git diff --git a/src/marc_read_line.c b/src/marc_read_line.c index 739ec86..2137197 100644 --- a/src/marc_read_line.c +++ b/src/marc_read_line.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -144,7 +143,7 @@ int yaz_marc_read_line(yaz_marc_t mt, &length_implementation); header_created = 1; } - else if (line_len > 5 && line[0] != ' ' && line[1] != ' ' + else if (line_len > 4 && line[0] != ' ' && line[1] != ' ' && line[2] != ' ' && line[3] == ' ' ) { /* deal with data/control lines: 245 12 ........ */ @@ -231,7 +230,6 @@ int yaz_marc_read_line(yaz_marc_t mt, cp++; } } - assert(len >= 0); yaz_marc_add_subfield(mt, cp, len); if (!next) break;