From: Adam Dickmeiss Date: Thu, 8 Mar 2012 08:19:58 +0000 (+0100) Subject: record_conv: fix error handling for marc charsets mis X-Git-Tag: v4.2.29~5 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=2e8277ab9c32d32ac776f7164828ef016cf06860 record_conv: fix error handling for marc charsets mis Fix really brain damaged error handling of marc charset check. --- diff --git a/src/record_conv.c b/src/record_conv.c index bf3c362..a272aee 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -374,14 +374,14 @@ static void *construct_marc(const xmlNode *ptr, } yaz_iconv_close(cd); } - else if (info->input_charset) + else if (!info->output_charset) { wrbuf_printf(wr_error, "Element : " "attribute 'outputcharset' missing"); nmem_destroy(info->nmem); return 0; } - else if (info->output_charset) + else if (!info->input_charset) { wrbuf_printf(wr_error, "Element : " "attribute 'inputcharset' missing");