cast the parameter to toupper()/tolower() to unsigned char, so that

this works with *p > 127
This commit is contained in:
jdolecek 2001-02-09 00:56:18 +00:00
parent 19fb6ccf8d
commit 7193677c62

4
dist/nawk/run.c vendored
View File

@ -1501,11 +1501,11 @@ Cell *bltin(Node **a, int n) /* builtin functions. a[0] is type, a[1] is arg lis
if (t == FTOUPPER) {
for (p = buf; *p; p++)
if (islower((uschar) *p))
*p = toupper(*p);
*p = toupper((uschar) *p);
} else {
for (p = buf; *p; p++)
if (isupper((uschar) *p))
*p = tolower(*p);
*p = tolower((uschar) *p);
}
tempfree(x);
x = gettemp();