diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-01-03 21:30:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2011-01-03 21:30:50 +0000 |
commit | 72f9055c4558e2d50b3237459eb9614394fe64df (patch) | |
tree | afa2380b96cc838b0a5a04b0fc9c33750e928e5c /usr.bin/tmux/status.c | |
parent | f8cd558993fbc83ab30ba7daf7d47220d4f773e5 (diff) |
Handle a # at the end of a replacement string (such as status-left)
correctly. Found by Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r-- | usr.bin/tmux/status.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index ee84ec1c218..581a3d85b43 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.69 2011/01/01 16:51:21 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.70 2011/01/03 21:30:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -456,7 +456,7 @@ status_replace(struct client *c, break; ch = *iptr++; - if (ch != '#') { + if (ch != '#' || *iptr == '\0') { *optr++ = ch; continue; } |