(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
|
int
|
||||||
command(void)
|
command(void)
|
||||||
{
|
{
|
||||||
unsigned int x;
|
unsigned int i;
|
||||||
char *redir; /* UTF-8 */
|
char *redir; /* UTF-8 */
|
||||||
char scanspace[1024];
|
char scanspace[1024];
|
||||||
|
|
||||||
|
@ -157,10 +157,8 @@ command(void)
|
||||||
together -- Sasha */
|
together -- Sasha */
|
||||||
/* alarm((unsigned int)60*60); 1 hour */
|
/* alarm((unsigned int)60*60); 1 hour */
|
||||||
if (player->condarg != NULL)
|
if (player->condarg != NULL)
|
||||||
for (x = 0; x < strlen(player->condarg); x++)
|
for (i = 0; i < strlen(player->condarg); i++)
|
||||||
if (isupper(*(player->condarg + x)))
|
player->condarg[i] = tolower(player->condarg[i]);
|
||||||
*(player->condarg + x) =
|
|
||||||
tolower(*(player->condarg + x));
|
|
||||||
if (dispatch(player->combuf, redir) < 0)
|
if (dispatch(player->combuf, redir) < 0)
|
||||||
pr("Try \"list of commands\" or \"info\"\n");
|
pr("Try \"list of commands\" or \"info\"\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue