提交 2e1ae3b6 编写于 作者: R Rich Felker

fix return value computation in one code path of wcsnrtombs

the affected code was wrongly counting characters instead of bytes.
上级 aee9b152
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册