add '(uchar)' casts to ctype calls
This is from the pull request for the assertion failure fix. It did not mention how to reproduce the assertion failure, just added casts to a bunch of isspace/isprint/tolower calls that didn't already have such. I removed an obsolete change for win/tty/topl.c and changed the win/win32/mswproc.c code to avoid using an expression with side-effects (*colorstring++) in calls to tolower() in case someone overrides that with a macro which evaluates its argument more than once as some pre- ANSI ones used to do. Not tested, might have typos.... sys/wince/*.c still needs similar casts.
This commit is contained in:
@@ -245,7 +245,8 @@ boolean thrown_weapon; /* thrown weapons are less deadly */
|
||||
boolean plural = (reason[strlen(reason) - 1] == 's') ? 1 : 0;
|
||||
|
||||
/* avoid "The" Orcus's sting was poisoned... */
|
||||
pline("%s%s %s poisoned!", isupper(*reason) ? "" : "The ", reason,
|
||||
pline("%s%s %s poisoned!",
|
||||
isupper((uchar) *reason) ? "" : "The ", reason,
|
||||
plural ? "were" : "was");
|
||||
}
|
||||
if (Poison_resistance) {
|
||||
|
||||
Reference in New Issue
Block a user