aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-09-27 20:54:43 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-09-27 20:54:43 +0000
commita73deec89d1f691aca51bb40106fcaf4e3f0a089 (patch)
tree942bed8858574516c14be873e5af242311e5384d
parentdb293c1c07d53047655244c72a250a61d00fac5f (diff)
downloadrtmux-a73deec89d1f691aca51bb40106fcaf4e3f0a089.tar.gz
rtmux-a73deec89d1f691aca51bb40106fcaf4e3f0a089.tar.bz2
rtmux-a73deec89d1f691aca51bb40106fcaf4e3f0a089.zip
Erm, check the right length for short cmds.
-rw-r--r--tmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmux.c b/tmux.c
index ecea49c6..a68d5456 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.15 2007-09-27 10:09:37 nicm Exp $ */
+/* $Id: tmux.c,v 1.16 2007-09-27 20:54:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -187,7 +187,7 @@ main(int argc, char **argv)
for (i = 0; i < NOP; i++) {
op = op_table + i;
- if (strncmp(argv[0], op->cmd, strlen(op->cmd)) == 0 ||
+ if (strncmp(argv[0], op->cmd, strlen(argv[0])) == 0 ||
(op->alias != NULL && strcmp(argv[0], op->alias) == 0))
exit(op->fn(path, argc, argv));
}