mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-02-17 01:21:47 +00:00
Early out of Cmd_CompleteArgument and Cmd_SetCommandCompletionFunc
Reported by Ensiform.
This commit is contained in:
parent
5e09f20cd4
commit
68ab4e9548
1 changed files with 6 additions and 2 deletions
|
@ -667,6 +667,7 @@ void Cmd_SetCommandCompletionFunc( const char *command, completionFunc_t complet
|
|||
for( cmd = cmd_functions; cmd; cmd = cmd->next ) {
|
||||
if( !Q_stricmp( command, cmd->name ) ) {
|
||||
cmd->complete = complete;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -743,8 +744,11 @@ void Cmd_CompleteArgument( const char *command, char *args, int argNum ) {
|
|||
cmd_function_t *cmd;
|
||||
|
||||
for( cmd = cmd_functions; cmd; cmd = cmd->next ) {
|
||||
if( !Q_stricmp( command, cmd->name ) && cmd->complete ) {
|
||||
cmd->complete( args, argNum );
|
||||
if( !Q_stricmp( command, cmd->name ) ) {
|
||||
if ( cmd->complete ) {
|
||||
cmd->complete( args, argNum );
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue