aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-12 13:51:44 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-12 13:51:44 +0000
commit514d6fa1ec60563318c67806334c3b8d97c95b02 (patch)
tree9cef972ede33ea4639442b467753720f49f650ab /cmd.c
parentf3404ee9229ae3acab973b93ca7a20eddd593c7f (diff)
downloadrtmux-514d6fa1ec60563318c67806334c3b8d97c95b02.tar.gz
rtmux-514d6fa1ec60563318c67806334c3b8d97c95b02.tar.bz2
rtmux-514d6fa1ec60563318c67806334c3b8d97c95b02.zip
Accept colours as strings.
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd.c b/cmd.c
index de07e3b4..c0bcd138 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.15 2007-10-12 13:03:58 nicm Exp $ */
+/* $Id: cmd.c,v 1.16 2007-10-12 13:51:44 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -56,7 +56,8 @@ cmd_parse(int argc, char **argv, char **cause)
entry = NULL;
for (entryp = cmd_table; *entryp != NULL; entryp++) {
- if (strcmp((*entryp)->alias, argv[0]) == 0) {
+ if ((*entryp)->alias != NULL &&
+ strcmp((*entryp)->alias, argv[0]) == 0) {
entry = *entryp;
break;
}