diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-08-01 22:04:57 +0000 | 
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-08-01 22:04:57 +0000 | 
| commit | e7241b8ffe2856c43aa6f2a539534aa99a43e194 (patch) | |
| tree | 75941c22b50b0607c05699d1ca48e547df05dbc8 /lib/libc/stdlib/strtouq.c | |
| parent | eb26b356512c8842719342dec498cd4dd4d901eb (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib/strtouq.c')
| -rw-r--r-- | lib/libc/stdlib/strtouq.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdlib/strtouq.c b/lib/libc/stdlib/strtouq.c index ee1e13b7d7c2..16dda0be3971 100644 --- a/lib/libc/stdlib/strtouq.c +++ b/lib/libc/stdlib/strtouq.c @@ -56,7 +56,7 @@ strtouq(nptr, endptr, base)  {  	register const char *s = nptr;  	register u_quad_t acc; -	register int c; +	register unsigned char c;  	register u_quad_t qbase, cutoff;  	register int neg, any, cutlim; @@ -87,6 +87,8 @@ strtouq(nptr, endptr, base)  	cutoff = (u_quad_t)UQUAD_MAX / qbase;  	cutlim = (u_quad_t)UQUAD_MAX % qbase;  	for (acc = 0, any = 0;; c = *s++) { +		if (!isascii(c)) +			break;  		if (isdigit(c))  			c -= '0';  		else if (isalpha(c))  | 
