From 14ce856a0a41fb7923d62bd173cd4d8e130f02f8 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 10 Mar 2011 10:22:53 +0100 Subject: [PATCH] Avoid empty strings for yaz_iconv_open yaz_iconv_open apparently returns a non-null handle in case of to=(null) and from="" .. Avoid we call it this way. This resulted in bad records for Pazpar2 and was introduced in YAZ 4.1.5. --- src/record_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/record_render.c b/src/record_render.c index 16351a2..ddfd391 100644 --- a/src/record_render.c +++ b/src/record_render.c @@ -28,7 +28,7 @@ static yaz_iconv_t iconv_create_charset(const char *record_charset, char *from_set1 = 0; char *from_set2 = 0; char *to_set = 0; - if (record_charset) + if (record_charset && *record_charset) { char *cp = charset_buf; -- 1.7.10.4