diff options
author | 2011-01-03 21:30:49 +0000 | |
---|---|---|
committer | 2011-01-03 21:30:49 +0000 | |
commit | e9a993d6672f08c490788c23987b15393fae50ff (patch) | |
tree | 1734abc3975cd0a0c96fdb5bda20494aa7b743c7 | |
parent | remove sc->sc_kbcslot, as is always PCKBC_AUX_SLOT (diff) | |
download | wireguard-openbsd-e9a993d6672f08c490788c23987b15393fae50ff.tar.xz wireguard-openbsd-e9a993d6672f08c490788c23987b15393fae50ff.zip |
Handle a # at the end of a replacement string (such as status-left)
correctly. Found by Thomas Adam.
-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; } |