mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 00:30:57 +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 <stdlib.h>
|
||||||
|
|
||||||
#include "QF/hash.h"
|
#include "QF/hash.h"
|
||||||
|
#include "QF/qtypes.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
|
|
||||||
#include "old_keys.h"
|
#include "old_keys.h"
|
||||||
|
@ -246,7 +247,7 @@ OK_TranslateKeyName (const char *name)
|
||||||
const char *s = name;
|
const char *s = name;
|
||||||
char *d = uname;
|
char *d = uname;
|
||||||
|
|
||||||
while ((*d++ = toupper (*s)))
|
while ((*d++ = toupper ((byte) *s)))
|
||||||
s++;
|
s++;
|
||||||
ok = Hash_Find (old_key_table, uname);
|
ok = Hash_Find (old_key_table, uname);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
|
|
@ -384,9 +384,11 @@ SL_SortEntry (server_entry_t *start)
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
while ((start->desc[i] != '\0') && (q->desc[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++;
|
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);
|
SL_Swap (start, q);
|
||||||
q = start;
|
q = start;
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ CF_Open (const char *path, const char *mode)
|
||||||
|
|
||||||
j = fullpath->str + strlen (fullpath->str) - strlen (path);
|
j = fullpath->str + strlen (fullpath->str) - strlen (path);
|
||||||
for (i = 0; path[i]; i++, j++) // strcpy, but force lowercase
|
for (i = 0; path[i]; i++, j++) // strcpy, but force lowercase
|
||||||
*j = tolower (path[i]);
|
*j = tolower ((byte) path[i]);
|
||||||
*j = '\0';
|
*j = '\0';
|
||||||
|
|
||||||
if (CF_AlreadyOpen (fullpath->str, mode[0])) {
|
if (CF_AlreadyOpen (fullpath->str, mode[0])) {
|
||||||
|
|
|
@ -66,8 +66,8 @@ cvar_t *sv_leetnickmatch;
|
||||||
static qboolean
|
static qboolean
|
||||||
match_char (char a, char b)
|
match_char (char a, char b)
|
||||||
{
|
{
|
||||||
a = tolower (sys_char_map[(byte)a]);
|
a = tolower ((byte) sys_char_map[(byte) a]);
|
||||||
b = tolower (sys_char_map[(byte)b]);
|
b = tolower ((byte) sys_char_map[(byte) b]);
|
||||||
|
|
||||||
if (a == b || (sv_leetnickmatch->int_val
|
if (a == b || (sv_leetnickmatch->int_val
|
||||||
&& ( (a == '1' && b == 'i') || (a == 'i' && b == '1')
|
&& ( (a == '1' && b == 'i') || (a == 'i' && b == '1')
|
||||||
|
|
|
@ -256,7 +256,7 @@ KK_qwchar (char c)
|
||||||
{
|
{
|
||||||
c &= 0x7f;
|
c &= 0x7f;
|
||||||
if (c >= ' ')
|
if (c >= ' ')
|
||||||
return tolower (c);
|
return tolower ((byte) c);
|
||||||
if (c >= 0x12 && c <= 0x1b)
|
if (c >= 0x12 && c <= 0x1b)
|
||||||
return c - 0x12 + '0';
|
return c - 0x12 + '0';
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue