aboutsummaryrefslogtreecommitdiff
path: root/cmd-string.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-07-14 06:54:38 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-07-14 06:54:38 +0000
commit910d6282c49909a3f0277a858b699a8e06d28589 (patch)
treee376642b73dade5781540a40ab667d515261267d /cmd-string.c
parent20e322bf9b9e46af1c225e0a6464318faffd8f4d (diff)
downloadrtmux-910d6282c49909a3f0277a858b699a8e06d28589.tar.gz
rtmux-910d6282c49909a3f0277a858b699a8e06d28589.tar.bz2
rtmux-910d6282c49909a3f0277a858b699a8e06d28589.zip
Whoops, chose the wrong one in a conflict. Revert.
Diffstat (limited to 'cmd-string.c')
-rw-r--r--cmd-string.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd-string.c b/cmd-string.c
index 1add4a26..00331c32 100644
--- a/cmd-string.c
+++ b/cmd-string.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-string.c,v 1.20 2009-07-14 06:38:14 nicm Exp $ */
+/* $Id: cmd-string.c,v 1.21 2009-07-14 06:54:38 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -158,16 +158,13 @@ cmd_string_parse(const char *s, struct cmd_list **cmdlist, char **cause)
rval = 0;
goto out;
case '~':
- if (!have_arg) {
- t = cmd_string_expand_tilde(s, &p);
- if (t == NULL)
+ if (have_arg == 0) {
+ if ((t = cmd_string_expand_tilde(s, &p)) == NULL)
goto error;
buf = xrealloc(buf, 1, len + strlen(t) + 1);
strlcpy(buf + len, t, strlen(t) + 1);
len += strlen(t);
xfree(t);
-
- have_arg = 1;
break;
}
/* FALLTHROUGH */