diff --git a/src/client/curl/download.c b/src/client/curl/download.c index 8920dca2..23ab5781 100644 --- a/src/client/curl/download.c +++ b/src/client/curl/download.c @@ -127,7 +127,7 @@ static void CL_EscapeHTTPPath(const char *filePath, char *escaped) for (int i = 0; i < len; i++) { - if (!isalnum(filePath[i]) && filePath[i] != ';' && filePath[i] != '/' && + if (!isalnum((unsigned char)filePath[i]) && filePath[i] != ';' && filePath[i] != '/' && filePath[i] != '?' && filePath[i] != ':' && filePath[i] != '@' && filePath[i] != '&' && filePath[i] != '=' && filePath[i] != '+' && filePath[i] != '$' && filePath[i] != ',' && filePath[i] != '[' && filePath[i] != ']' && filePath[i] != '-' && filePath[i] != '_' && diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c index 2e36a4d6..e78fec15 100644 --- a/src/client/menu/menu.c +++ b/src/client/menu/menu.c @@ -3206,7 +3206,7 @@ StartServer_MenuInit(void) for (j = 0; j < l; j++) { - shortname[j] = toupper(shortname[j]); + shortname[j] = toupper((unsigned char)shortname[j]); } strcpy(longname, COM_Parse(&s)); diff --git a/src/client/refresh/gl1/gl1_main.c b/src/client/refresh/gl1/gl1_main.c index 8bf3b5bd..169e0b3d 100644 --- a/src/client/refresh/gl1/gl1_main.c +++ b/src/client/refresh/gl1/gl1_main.c @@ -969,7 +969,7 @@ R_RenderView(refdef_t *fd) // Decode the colour name from its character. for (eye = 0; eye < 2; ++eye) { colour = 0; - switch (toupper(gl1_stereo_anaglyph_colors->string[eye])) { + switch (toupper((unsigned char)gl1_stereo_anaglyph_colors->string[eye])) { case 'B': ++colour; // 001 Blue case 'G': ++colour; // 010 Green case 'C': ++colour; // 011 Cyan diff --git a/src/common/cmdparser.c b/src/common/cmdparser.c index 26474655..5790092c 100644 --- a/src/common/cmdparser.c +++ b/src/common/cmdparser.c @@ -971,7 +971,7 @@ Cmd_CompleteMapCommand(char *partial) { for (k = 1; k < nbMatches; k++) { - if (j >= strlen(pmatch[k]) || tolower(pmatch[0][j]) != tolower(pmatch[k][j])) + if (j >= strlen(pmatch[k]) || tolower((unsigned char)pmatch[0][j]) != tolower((unsigned char)pmatch[k][j])) { partialFillContinue = false; break; diff --git a/src/common/shared/shared.c b/src/common/shared/shared.c index d74e2cd7..2164389f 100644 --- a/src/common/shared/shared.c +++ b/src/common/shared/shared.c @@ -1104,7 +1104,7 @@ Q_strlwr ( char *s ) while ( *s ) { - *s = tolower( *s ); + *s = tolower( (unsigned char)*s ); s++; }