From: Rich Felker Date: Thu, 7 Apr 2011 20:13:47 +0000 (-0400) Subject: fix broken unsigned comparison in wcstoumax X-Git-Tag: v0.7.8~38 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4095f8338d77cad73a8afbf2d4a0d7987e472bab;p=oweals%2Fmusl.git fix broken unsigned comparison in wcstoumax --- 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 */