mirror of
https://github.com/fluencelabs/musl
synced 2025-06-29 22:51:55 +00:00
fix return value computation in one code path of wcsnrtombs
the affected code was wrongly counting characters instead of bytes.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user