about summary refs log tree commit diff
path: root/iconv
diff options
context:
space:
mode:
Diffstat (limited to 'iconv')
-rw-r--r--iconv/iconv_prog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index c5910a5585..719f20d45b 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -289,7 +289,7 @@ process_block (iconv_t cd, const char *addr, size_t len, FILE *output)
       if (outptr != outbuf)
 	{
 	  /* We have something to write out.  */
-	  if (fwrite (outbuf, 1, outptr - outbuf, output) != 0
+	  if (fwrite (outbuf, 1, outptr - outbuf, output)  < outptr - outbuf
 	      || ferror (output))
 	    {
 	      /* Error occurred while printing the result.  */