提交 4095f833 编写于 作者: R Rich Felker

fix broken unsigned comparison in wcstoumax

上级 bb8d3d00
...@@ -34,7 +34,7 @@ uintmax_t wcstoumax(const wchar_t *s, wchar_t **p, int base) ...@@ -34,7 +34,7 @@ uintmax_t wcstoumax(const wchar_t *s, wchar_t **p, int base)
/* Convert to normal char string so we can use strtoumax */ /* Convert to normal char string so we can use strtoumax */
buf[0] = sign; buf[0] = sign;
if (wcstombs(buf+!!sign, s, sizeof buf-1) < 0) return 0; if (wcstombs(buf+!!sign, s, sizeof buf-1) == -1) return 0;
buf[sizeof buf-1]=0; buf[sizeof buf-1]=0;
/* Compute final position */ /* Compute final position */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册