minor fixes

This commit is contained in:
flowtron
2022-05-06 20:46:31 +02:00
parent 464e58d482
commit 7d0b271c72
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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" },
+1 -1
View File
@@ -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
View File
@@ -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;