1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Check first entry in command sub_funcs

This commit is contained in:
James Booth 2016-04-27 21:52:58 +01:00
parent 5687c3e419
commit df30d4ba52

View File

@ -3288,7 +3288,7 @@ _cmd_execute(ProfWin *window, const char *const command, const char *const inp)
ui_invalid_command_usage(cmd->cmd, cmd->setting_func); ui_invalid_command_usage(cmd->cmd, cmd->setting_func);
return TRUE; return TRUE;
} }
if (args[0] && cmd->sub_funcs) { if (args[0] && cmd->sub_funcs[0][0]) {
int i = 0; int i = 0;
while (cmd->sub_funcs[i][0]) { while (cmd->sub_funcs[i][0]) {
if (g_strcmp0(args[0], (char*)cmd->sub_funcs[i][0]) == 0) { if (g_strcmp0(args[0], (char*)cmd->sub_funcs[i][0]) == 0) {