X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fmarc_read_iso2709.c;h=54d865354e8d119e0d6c96d136025fa23334636c;hp=07cd59a7c9db0015e2716de2fe68671a865c3666;hb=9d01070e0ac3b559b13c76e1cd0f1b0ef17f03c0;hpb=a29cb625a72a11d5a65ee3cb423dc35193b5ca79 diff --git a/src/marc_read_iso2709.c b/src/marc_read_iso2709.c index 07cd59a..54d8653 100644 --- a/src/marc_read_iso2709.c +++ b/src/marc_read_iso2709.c @@ -177,7 +177,8 @@ int yaz_marc_read_iso2709(yaz_marc_t mt, const char *buf, int bsize) buf[i] != ISO2709_RS && buf[i] != ISO2709_IDFS && buf[i] != ISO2709_FS) i++; - yaz_marc_add_subfield(mt, buf+code_offset, i - code_offset); + if (i > code_offset) + yaz_marc_add_subfield(mt, buf+code_offset, i - code_offset); } } else