From a2aaaf866a85fcb54078dc49f43af546f3667401 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 26 Aug 2020 20:15:32 -0300 Subject: [PATCH] Fixing charset conversion. --- src/core/charset/iconv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/charset/iconv.c b/src/core/charset/iconv.c index f6a1b97..69bfbfe 100644 --- a/src/core/charset/iconv.c +++ b/src/core/charset/iconv.c @@ -108,7 +108,11 @@ struct _lib3270_iconv } - return NULL; + char * rc = lib3270_malloc(length+1); + strcpy(rc,str); + rc[length] = 0; + + return rc; } char * lib3270_iconv_from_host(LIB3270_ICONV *conv, const char *str, int len) -- libgit2 0.21.2