about summary refs log tree commit diff
path: root/wcsmbs/wctob.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wctob.c')
-rw-r--r--wcsmbs/wctob.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c
index 0ee17ce443..68ab6614f7 100644
--- a/wcsmbs/wctob.c
+++ b/wcsmbs/wctob.c
@@ -36,6 +36,9 @@ wctob (c)
   size_t dummy;
   int status;
 
+  if (c == WEOF)
+    return EOF;
+
   /* Tell where we want the result.  */
   data.__outbuf = buf;
   data.__outbufend = buf + MB_LEN_MAX;