(command): Simplify mapping of condarg to lower case.
This commit is contained in:
parent
fce8b1aa38
commit
d182f3dc1d
1 changed files with 3 additions and 5 deletions
|
@ -142,7 +142,7 @@ player_main(struct player *p)
|
|||
int
|
||||
command(void)
|
||||
{
|
||||
unsigned int x;
|
||||
unsigned int i;
|
||||
char *redir; /* UTF-8 */
|
||||
char scanspace[1024];
|
||||
|
||||
|
@ -157,10 +157,8 @@ command(void)
|
|||
together -- Sasha */
|
||||
/* alarm((unsigned int)60*60); 1 hour */
|
||||
if (player->condarg != NULL)
|
||||
for (x = 0; x < strlen(player->condarg); x++)
|
||||
if (isupper(*(player->condarg + x)))
|
||||
*(player->condarg + x) =
|
||||
tolower(*(player->condarg + x));
|
||||
for (i = 0; i < strlen(player->condarg); i++)
|
||||
player->condarg[i] = tolower(player->condarg[i]);
|
||||
if (dispatch(player->combuf, redir) < 0)
|
||||
pr("Try \"list of commands\" or \"info\"\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue