ctype sign fixes (Tom Miller)

This commit is contained in:
rsc 2005-10-31 16:42:32 +00:00
parent b330c942b4
commit 74374cc8a4
10 changed files with 22 additions and 17 deletions

View file

@ -4,6 +4,7 @@
*
*/
#include <u.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@ -170,10 +171,10 @@ str_convert(str, err)
*
*/
if ( ! isdigit(**str) )
if ( ! isdigit((uchar)**str) )
return(err);
for ( i = 0; isdigit(**str); *str += 1 )
for ( i = 0; isdigit((uchar)**str); *str += 1 )
i = 10 * i + **str - '0';
return(i);