about summary refs log tree commit diff
path: root/src/stdlib
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-04-07 16:13:47 -0400
committerRich Felker <dalias@aerifal.cx>2011-04-07 16:13:47 -0400
commit4095f8338d77cad73a8afbf2d4a0d7987e472bab (patch)
tree7854233ed42e102d6f10dc09318a5fef562dbf69 /src/stdlib
parentbb8d3d00e239f1929af29c441eb729132ffeed83 (diff)
downloadmusl-4095f8338d77cad73a8afbf2d4a0d7987e472bab.tar.gz
musl-4095f8338d77cad73a8afbf2d4a0d7987e472bab.tar.xz
musl-4095f8338d77cad73a8afbf2d4a0d7987e472bab.zip
fix broken unsigned comparison in wcstoumax
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/wcstoumax.c2
1 files changed, 1 insertions, 1 deletions
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 */