aboutsummaryrefslogtreecommitdiff
path: root/iconv/gconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconv/gconv.c')
-rw-r--r--iconv/gconv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/iconv/gconv.c b/iconv/gconv.c
index 7cb7869..6a7424b 100644
--- a/iconv/gconv.c
+++ b/iconv/gconv.c
@@ -49,7 +49,8 @@ __gconv (__gconv_t cd, const unsigned char **inbuf,
/* We just flush. */
result = DL_CALL_FCT (cd->__steps->__fct,
(cd->__steps, cd->__data, NULL, NULL, NULL,
- irreversible, 1, 0));
+ irreversible,
+ cd->__data[last_step].__outbuf == NULL ? 2 : 1, 0));
else
{
const unsigned char *last_start;