(__gconv): For flush without output, pass do_flush = 2.
authordrepper <drepper>
Tue, 22 May 2001 21:37:04 +0000 (21:37 +0000)
committerdrepper <drepper>
Tue, 22 May 2001 21:37:04 +0000 (21:37 +0000)
iconv/gconv.c

index 7cb7869..6a7424b 100644 (file)
@@ -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;