mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Cast ctype functions' argument to unsigned char.
ok guenther@
This commit is contained in:
parent
9c23307a93
commit
cb40a3d352
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hack.objnam.c,v 1.9 2009/10/27 23:59:25 deraadt Exp $ */
|
||||
/* $OpenBSD: hack.objnam.c,v 1.10 2015/10/24 18:49:39 mmcc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
@ -449,9 +449,9 @@ readobjnam(char *bp, size_t len)
|
||||
cnt = 1;
|
||||
cp += 2;
|
||||
}
|
||||
if(!cnt && isdigit(*cp)){
|
||||
if(!cnt && isdigit((unsigned char)*cp)){
|
||||
cnt = atoi(cp);
|
||||
while(isdigit(*cp)) cp++;
|
||||
while(isdigit((unsigned char)*cp)) cp++;
|
||||
while(*cp == ' ') cp++;
|
||||
}
|
||||
if(!cnt) cnt = 1; /* %% what with "gems" etc. ? */
|
||||
@ -459,7 +459,7 @@ readobjnam(char *bp, size_t len)
|
||||
if(*cp == '+' || *cp == '-'){
|
||||
spesgn = (*cp++ == '+') ? 1 : -1;
|
||||
spe = atoi(cp);
|
||||
while(isdigit(*cp)) cp++;
|
||||
while(isdigit((unsigned char)*cp)) cp++;
|
||||
while(*cp == ' ') cp++;
|
||||
} else {
|
||||
p = strrchr(cp, '(');
|
||||
@ -468,7 +468,7 @@ readobjnam(char *bp, size_t len)
|
||||
else *p = 0;
|
||||
p++;
|
||||
spe = atoi(p);
|
||||
while(isdigit(*p)) p++;
|
||||
while(isdigit((unsigned char)*p)) p++;
|
||||
if(strcmp(p, ")")) spe = 0;
|
||||
else spesgn = 1;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hack.trap.c,v 1.7 2009/10/27 23:59:25 deraadt Exp $ */
|
||||
/* $OpenBSD: hack.trap.c,v 1.8 2015/10/24 18:49:39 mmcc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
@ -476,7 +476,8 @@ level_tele()
|
||||
do {
|
||||
pline("To what level do you want to teleport? [type a number] ");
|
||||
getlin(buf);
|
||||
} while(!isdigit(buf[0]) && (buf[0] != '-' || !isdigit(buf[1])));
|
||||
} while(!isdigit((unsigned char)buf[0]) &&
|
||||
(buf[0] != '-' || !isdigit((unsigned char)buf[1])));
|
||||
newlevel = atoi(buf);
|
||||
} else {
|
||||
newlevel = 5 + rn2(20); /* 5 - 24 */
|
||||
|
Loading…
Reference in New Issue
Block a user