mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +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 ) {
|
for( cmd = cmd_functions; cmd; cmd = cmd->next ) {
|
||||||
if( !Q_stricmp( command, cmd->name ) ) {
|
if( !Q_stricmp( command, cmd->name ) ) {
|
||||||
cmd->complete = complete;
|
cmd->complete = complete;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -743,9 +744,12 @@ void Cmd_CompleteArgument( const char *command, char *args, int argNum ) {
|
||||||
cmd_function_t *cmd;
|
cmd_function_t *cmd;
|
||||||
|
|
||||||
for( cmd = cmd_functions; cmd; cmd = cmd->next ) {
|
for( cmd = cmd_functions; cmd; cmd = cmd->next ) {
|
||||||
if( !Q_stricmp( command, cmd->name ) && cmd->complete ) {
|
if( !Q_stricmp( command, cmd->name ) ) {
|
||||||
|
if ( cmd->complete ) {
|
||||||
cmd->complete( args, argNum );
|
cmd->complete( args, argNum );
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue