diff options
| author | Tim J. Robbins <tjr@FreeBSD.org> | 2004-07-22 02:57:29 +0000 |
|---|---|---|
| committer | Tim J. Robbins <tjr@FreeBSD.org> | 2004-07-22 02:57:29 +0000 |
| commit | 6740cd8374b4e9697bd126680ea373ee02c43bdc (patch) | |
| tree | d77aba62583eee0f9601993ff09719e728ec78ef /lib | |
| parent | a99c936ba351f3e498f7ad13269b5d462f33fe9a (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/locale/wcsnrtombs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/locale/wcsnrtombs.c b/lib/libc/locale/wcsnrtombs.c index 6f2d5b0c88c0d..68d6b5ceae02e 100644 --- a/lib/libc/locale/wcsnrtombs.c +++ b/lib/libc/locale/wcsnrtombs.c @@ -63,11 +63,11 @@ __wcsnrtombs_std(char * __restrict dst, const wchar_t ** __restrict src, /* Invalid character - wcrtomb() sets errno. */ return ((size_t)-1); else if (*s == L'\0') - break; + return (nbytes + nb - 1); s++; nbytes += nb; } - return (nbytes + nb - 1); + return (nbytes); } while (len > 0 && nwc-- > 0) { |
