summaryrefslogtreecommitdiff
path: root/wcsmbs/wctob.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wctob.c')
-rw-r--r--wcsmbs/wctob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c
index 0461877d32..e70b4e7fe6 100644
--- a/wcsmbs/wctob.c
+++ b/wcsmbs/wctob.c
@@ -56,9 +56,10 @@ wctob (c)
(const char *) inbuf, &inbytes,
&converted, 0);
/* The conversion failed or the output is too long. */
- if (status != GCONV_OK && status != GCONV_FULL_OUTPUT
+ if ((status != GCONV_OK && status != GCONV_FULL_OUTPUT
+ && status != GCONV_EMPTY_INPUT)
|| data.outbufavail != 1)
- return WEOF;
+ return EOF;
return buf[0];
}