summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/multibyte/mbrtowc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/multibyte/mbrtowc.c b/src/multibyte/mbrtowc.c
index cc497810..ec323859 100644
--- a/src/multibyte/mbrtowc.c
+++ b/src/multibyte/mbrtowc.c
@@ -22,9 +22,8 @@ size_t mbrtowc(wchar_t *restrict wc, const char *restrict src, size_t n, mbstate
c = *(unsigned *)st;
if (!s) {
- s = (void *)"";
- wc = (void *)&wc;
- n = 1;
+ if (c) goto ilseq;
+ return 0;
} else if (!wc) wc = (void *)&wc;
if (!n) return -2;