Commit a2aaaf866a85fcb54078dc49f43af546f3667401
1 parent
c539cc10
Exists in
master
and in
3 other branches
Fixing charset conversion.
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/core/charset/iconv.c
@@ -108,7 +108,11 @@ struct _lib3270_iconv | @@ -108,7 +108,11 @@ struct _lib3270_iconv | ||
108 | 108 | ||
109 | } | 109 | } |
110 | 110 | ||
111 | - return NULL; | 111 | + char * rc = lib3270_malloc(length+1); |
112 | + strcpy(rc,str); | ||
113 | + rc[length] = 0; | ||
114 | + | ||
115 | + return rc; | ||
112 | } | 116 | } |
113 | 117 | ||
114 | char * lib3270_iconv_from_host(LIB3270_ICONV *conv, const char *str, int len) | 118 | char * lib3270_iconv_from_host(LIB3270_ICONV *conv, const char *str, int len) |