diff --git a/src/multibyte/wcsnrtombs.c b/src/multibyte/wcsnrtombs.c index 7eb05d459ab826fbba890d52796302d799b1b251..ee4a534ab0c5131991a9af15c612f63391cf8d27 100644 --- a/src/multibyte/wcsnrtombs.c +++ b/src/multibyte/wcsnrtombs.c @@ -40,7 +40,7 @@ size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, s ws++; wn--; /* safe - this loop runs fewer than sizeof(buf) times */ s+=l; n-=l; - cnt++; + cnt += l; } if (dst) *wcs = ws; return cnt;