From: Adam Dickmeiss Date: Tue, 23 Dec 2008 23:36:05 +0000 (+0100) Subject: Fixed bug #2352: yaz-marcdump crashes for certain record. X-Git-Tag: v3.0.40~23 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=a5ac9b8b5662012c69c5e7e5287c5ffc0c7a1f25;hp=8377081b9917f820ae91f17e24743c84ef0cfc4d Fixed bug #2352: yaz-marcdump crashes for certain record. --- diff --git a/src/marcdisp.c b/src/marcdisp.c index a11f9dc..a5084ce 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -467,7 +467,7 @@ int yaz_marc_write_line(yaz_marc_t mt, WRBUF wr) the code is a single character .. However we've seen multibyte codes, so see how big it really is */ size_t using_code_len = - (identifier_length != 2) ? identifier_length - 1 + (identifier_length > 2) ? identifier_length - 1 : cdata_one_character(mt, s->code_data); @@ -616,7 +616,7 @@ static int yaz_marc_write_marcxml_ns1(yaz_marc_t mt, WRBUF wr, the code is a single character .. However we've seen multibyte codes, so see how big it really is */ size_t using_code_len = - (identifier_length != 2) ? identifier_length - 1 + (identifier_length > 2) ? identifier_length - 1 : cdata_one_character(mt, s->code_data); @@ -786,7 +786,7 @@ int yaz_marc_write_xml(yaz_marc_t mt, xmlNode **root_ptr, the code is a single character .. However we've seen multibyte codes, so see how big it really is */ size_t using_code_len = - (identifier_length != 2) ? identifier_length - 1 + (identifier_length > 2) ? identifier_length - 1 : cdata_one_character(mt, s->code_data);