X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=inline;f=src%2Fstdlib%2Fwcstoumax.c;h=86528ef15715be4952bb950ac6941594d3c84783;hb=9beb6330c08839e8bb2ebcd129c97c395d9d327e;hp=a8f4680f223fc1cad7a0e2760a9b6f10c975d868;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stdlib/wcstoumax.c b/src/stdlib/wcstoumax.c index a8f4680f..86528ef1 100644 --- a/src/stdlib/wcstoumax.c +++ b/src/stdlib/wcstoumax.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -33,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 */ 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; /* Compute final position */