projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb8d3d0
)
fix broken unsigned comparison in wcstoumax
author
Rich Felker
<dalias@aerifal.cx>
Thu, 7 Apr 2011 20:13:47 +0000
(16:13 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 7 Apr 2011 20:13:47 +0000
(16:13 -0400)
src/stdlib/wcstoumax.c
patch
|
blob
|
history
diff --git
a/src/stdlib/wcstoumax.c
b/src/stdlib/wcstoumax.c
index 456ddedddfb805bb841bfa9220fc4a9b1f93f4bd..86528ef15715be4952bb950ac6941594d3c84783 100644
(file)
--- 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 */