minor fixes
This commit is contained in:
@@ -792,7 +792,7 @@ void writekeymap() // create keymap.cfg with proper constants from SDL2 header f
|
||||
{ SDLK_F15, "F15" },
|
||||
{ SDLK_NUMLOCKCLEAR, "NUMLOCK" },
|
||||
{ SDLK_CAPSLOCK, "CAPSLOCK" },
|
||||
{ SDLK_SCROLLLOCK, "SCROLLOCK" },
|
||||
{ SDLK_SCROLLLOCK, "SCROLLOCK" }, // fixing historic typo could break too much
|
||||
{ SDLK_RSHIFT, "RSHIFT" },
|
||||
{ SDLK_LSHIFT, "LSHIFT" },
|
||||
{ SDLK_RCTRL, "RCTRL" },
|
||||
|
||||
@@ -474,7 +474,7 @@ void filterlang(char *d, const char *s)
|
||||
|
||||
void filtercountrycode(char *d, const char *s) // returns exactly two uppercase chars or "--"
|
||||
{
|
||||
if(isalpha(s[0]) && isalpha(s[1]) && !s[2])
|
||||
if(strlen(s) == 2 && isalpha(s[0]) && isalpha(s[1]))
|
||||
{
|
||||
d[0] = toupper(s[0]);
|
||||
d[1] = toupper(s[1]);
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@ struct client // server side version of "dynent" type
|
||||
|
||||
void reset()
|
||||
{
|
||||
name[0] = pwd[0] = demoflags = 0;
|
||||
name[0] = pwd[0] = country[0] = lang[0] = demoflags = 0;
|
||||
ip = ip_censored = 0;
|
||||
pubkeyhex[0] = '\0';
|
||||
vita = NULL;
|
||||
|
||||
Reference in New Issue
Block a user