dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 72547956200a556af43a61983e239ec2ddd3514d
parent 64eed4e9658c0c808988f00dbbd4b8727d6e18a8
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Mon, 16 Jun 2008 00:46:26 +0200

Initialize args array properly

Diffstat:
cmdfifo.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmdfifo.c b/cmdfifo.c @@ -29,7 +29,8 @@ handle_cmdfifo() { if ((cmd = get_cmd_by_name(s)) != NULL) { bool quote = false; int argc = 0; - const char *args[MAX_ARGS], *arg = p; + /* XXX: initializer assumes MAX_ARGS == 2 use a initialization loop? */ + const char *args[MAX_ARGS] = { NULL, NULL}, *arg = p; if (cmd->action.args[0]) { cmd->action.cmd(cmd->action.args); break;