more signedness bugs

This commit is contained in:
rsc 2005-11-01 18:06:00 +00:00
parent 14367520a2
commit 5ed63a9b4e
3 changed files with 4 additions and 5 deletions

View file

@ -189,9 +189,9 @@ input(void)
ERROR "argfp underflow" FATAL;
popsrc();
goto loop;
} else if (c == '$' && isdigit((uchar)*srcp->sp)) {
} else if (c == '$' && isdigit((unsigned char)*srcp->sp)) {
int n = 0;
while (isdigit((uchar)*srcp->sp))
while (isdigit((unsigned char)*srcp->sp))
n = 10 * n + *srcp->sp++ - '0';
if (n > 0 && n <= MAXARGS)
pushsrc(String, argfp->argstk[n-1]);