summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-11-11 07:25:05 +0000
committertjr <tjr@FreeBSD.org>2003-11-11 07:25:05 +0000
commit042225384faafd40d760a0aeec19898203d8cb3a (patch)
treed387a49f67b3eb655d659fa56cca541632d59207
parent035780bafdea135ec73766993507c204a585d87a (diff)
downloadFreeBSD-src-042225384faafd40d760a0aeec19898203d8cb3a.zip
FreeBSD-src-042225384faafd40d760a0aeec19898203d8cb3a.tar.gz
Fix a typo that caused mbrtowc() to always return 0.
-rw-r--r--lib/libc/locale/utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/locale/utf8.c b/lib/libc/locale/utf8.c
index 10f937b..e1cbdea 100644
--- a/lib/libc/locale/utf8.c
+++ b/lib/libc/locale/utf8.c
@@ -143,7 +143,7 @@ _UTF8_mbrtowc(wchar_t * __restrict pwc, const char * __restrict s, size_t n,
}
if (pwc != NULL)
*pwc = wch;
- return (wch == L'\0' ? 0 : i);
+ return (wch == L'\0' ? 0 : len);
}
size_t
OpenPOWER on IntegriCloud