summaryrefslogtreecommitdiffstats
path: root/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-01-03 21:30:49 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-01-03 21:30:49 +0000
commit5158dd9a8dddf34a00ec6359840488d34faabd88 (patch)
treec4a190ea20c305709b996011c959abd38b89c386 /status.c
parent3e8124009f6737c656e260b2f5b459b4ebe1a10c (diff)
Handle a # at the end of a replacement string (such as status-left)
correctly. Found by Thomas Adam.
Diffstat (limited to 'status.c')
-rw-r--r--status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/status.c b/status.c
index 073ccf12..c23f9ac3 100644
--- a/status.c
+++ b/status.c
@@ -456,7 +456,7 @@ status_replace(struct client *c,
break;
ch = *iptr++;
- if (ch != '#') {
+ if (ch != '#' || *iptr == '\0') {
*optr++ = ch;
continue;
}