$NetBSD$ Fix a possible SIGSEGV when doing: /bind ^I command_completion /^I NUMBER_OF_COMMANDS should be decreased by 2 for `cmd_cnt' in the special case for the empty string because: - We should omit the first command in irc_command[] (via the `command++' line before cmd_cnt assignment) - We should also omit the last NULL command in irc_command[]. --- source/edit.c.orig 2017-07-04 06:48:25.000000000 +0000 +++ source/edit.c @@ -2403,7 +2403,7 @@ command_completion(u_int key, u_char *pt if (*(command[0].name) == '\0') { command++; - cmd_cnt = NUMBER_OF_COMMANDS; + cmd_cnt = NUMBER_OF_COMMANDS - 2; } } if ((alias_cnt == 1) && (cmd_cnt == 0))