mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-03 16:01:08 +00:00
view command: match names case-insensitively
This commit is contained in:
parent
dd75c1621c
commit
4a2d187472
1 changed files with 2 additions and 3 deletions
|
@ -1912,11 +1912,10 @@ static INT32 LookupPlayer(const char *s)
|
||||||
|
|
||||||
for (playernum = 0; playernum < MAXPLAYERS; ++playernum)
|
for (playernum = 0; playernum < MAXPLAYERS; ++playernum)
|
||||||
{
|
{
|
||||||
/* Consider strcasestr? */
|
/* Match name case-insensitively: fully, or partially the start. */
|
||||||
/* Match name (case-insensitively) fully, or partially the start. */
|
|
||||||
if (playeringame[playernum])
|
if (playeringame[playernum])
|
||||||
if (stricmp(player_names[playernum], s) == 0 ||
|
if (stricmp(player_names[playernum], s) == 0 ||
|
||||||
strstr(player_names[playernum], s) == player_names[playernum] )
|
strnicmp(player_names[playernum], s, strlen(s)) == 0)
|
||||||
{
|
{
|
||||||
return playernum;
|
return playernum;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue