From 5158dd9a8dddf34a00ec6359840488d34faabd88 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 3 Jan 2011 21:30:49 +0000 Subject: [PATCH] Handle a # at the end of a replacement string (such as status-left) correctly. Found by Thomas Adam. --- status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }