X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdlib%2Fwcstoumax.c;h=86528ef15715be4952bb950ac6941594d3c84783;hb=8628eff9128d66cc69dbc301341dc55130a9817e;hp=456ddedddfb805bb841bfa9220fc4a9b1f93f4bd;hpb=c247ebdd989365d20da3ce41fdeb2002e0a1ba13;p=musl diff --git a/src/stdlib/wcstoumax.c b/src/stdlib/wcstoumax.c index 456ddedd..86528ef1 100644 --- a/src/stdlib/wcstoumax.c +++ b/src/stdlib/wcstoumax.c @@ -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 */ 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 */