cast the parameter to toupper()/tolower() to unsigned char, so that
this works with *p > 127
This commit is contained in:
parent
19fb6ccf8d
commit
7193677c62
4
dist/nawk/run.c
vendored
4
dist/nawk/run.c
vendored
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user