mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 09:21:09 +00:00
Yet more char index issues.
Should be getting near the end of these as qfcc tries to link in my hacked up tree :)
This commit is contained in:
parent
7f805c2527
commit
9250eb83bf
5 changed files with 10 additions and 7 deletions
|
@ -49,6 +49,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "QF/hash.h"
|
||||
#include "QF/qtypes.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "old_keys.h"
|
||||
|
@ -246,7 +247,7 @@ OK_TranslateKeyName (const char *name)
|
|||
const char *s = name;
|
||||
char *d = uname;
|
||||
|
||||
while ((*d++ = toupper (*s)))
|
||||
while ((*d++ = toupper ((byte) *s)))
|
||||
s++;
|
||||
ok = Hash_Find (old_key_table, uname);
|
||||
if (!ok) {
|
||||
|
|
|
@ -384,9 +384,11 @@ SL_SortEntry (server_entry_t *start)
|
|||
i = 0;
|
||||
|
||||
while ((start->desc[i] != '\0') && (q->desc[i] != '\0') &&
|
||||
(toupper (start->desc[i]) == toupper (q->desc[i])))
|
||||
(toupper ((byte) start->desc[i])
|
||||
== toupper ((byte) q->desc[i])))
|
||||
i++;
|
||||
if (toupper (start->desc[i]) > toupper (q->desc[i])) {
|
||||
if (toupper ((byte) start->desc[i])
|
||||
> toupper ((byte) q->desc[i])) {
|
||||
SL_Swap (start, q);
|
||||
q = start;
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ CF_Open (const char *path, const char *mode)
|
|||
|
||||
j = fullpath->str + strlen (fullpath->str) - strlen (path);
|
||||
for (i = 0; path[i]; i++, j++) // strcpy, but force lowercase
|
||||
*j = tolower (path[i]);
|
||||
*j = tolower ((byte) path[i]);
|
||||
*j = '\0';
|
||||
|
||||
if (CF_AlreadyOpen (fullpath->str, mode[0])) {
|
||||
|
|
|
@ -66,8 +66,8 @@ cvar_t *sv_leetnickmatch;
|
|||
static qboolean
|
||||
match_char (char a, char b)
|
||||
{
|
||||
a = tolower (sys_char_map[(byte)a]);
|
||||
b = tolower (sys_char_map[(byte)b]);
|
||||
a = tolower ((byte) sys_char_map[(byte) a]);
|
||||
b = tolower ((byte) sys_char_map[(byte) b]);
|
||||
|
||||
if (a == b || (sv_leetnickmatch->int_val
|
||||
&& ( (a == '1' && b == 'i') || (a == 'i' && b == '1')
|
||||
|
|
|
@ -256,7 +256,7 @@ KK_qwchar (char c)
|
|||
{
|
||||
c &= 0x7f;
|
||||
if (c >= ' ')
|
||||
return tolower (c);
|
||||
return tolower ((byte) c);
|
||||
if (c >= 0x12 && c <= 0x1b)
|
||||
return c - 0x12 + '0';
|
||||
switch (c) {
|
||||
|
|
Loading…
Reference in a new issue