Skip to content
Snippets Groups Projects
Commit e6bc0980 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Ignore trailing non-alpha-numeric characters in matchusername()

A name ending in a symbol (e.g. "Erich B.") would cause problems with this matching logic.
parent 15906e19
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2421 passed
...@@ -106,6 +106,10 @@ BOOL matchusername(scfg_t* cfg, const char* name, const char* comp) ...@@ -106,6 +106,10 @@ BOOL matchusername(scfg_t* cfg, const char* name, const char* comp)
break; break;
np++, cp++; np++, cp++;
} }
while(*np != '\0' && !IS_ALPHANUMERIC(*np))
np++;
while(*cp != '\0' && !IS_ALPHANUMERIC(*cp) && *cp != '@' )
cp++;
return *np == '\0' && (*cp == '\0' || *cp == '@'); return *np == '\0' && (*cp == '\0' || *cp == '@');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment