From fed99d9b18bfaa20d4af35580718337507566802 Mon Sep 17 00:00:00 2001 From: V V Date: Mon, 19 Oct 2015 18:11:47 +0300 Subject: [PATCH] fixed help --- interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface.c b/interface.c index f178f45..8e32b72 100644 --- a/interface.c +++ b/interface.c @@ -687,13 +687,13 @@ struct command commands[]; /* {{{ client methods */ void do_help (struct command *command, int arg_num, struct arg args[], struct in_ev *ev) { - assert (arg_num <= 1); + assert (arg_num == 1); if (ev) { mprint_start (ev); } int total = 0; mpush_color (ev, COLOR_YELLOW); struct command *cmd = commands; while (cmd->name) { - if (!arg_num || !strcmp (args[0].str, cmd->name)) { + if (!args[0].str || !strcmp (args[0].str, cmd->name)) { mprintf (ev, "%s\n", cmd->desc); total ++; }