mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-04 15:12:58 +00:00
view command: match names case-insensitively
This commit is contained in:
parent
4f8ef7c3aa
commit
011a498f4b
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)
|
||||
{
|
||||
/* Consider strcasestr? */
|
||||
/* Match name (case-insensitively) fully, or partially the start. */
|
||||
/* Match name case-insensitively: fully, or partially the start. */
|
||||
if (playeringame[playernum])
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue