From 3aaf5b9b1e4b5249a86db97d67291e22b90e1fef Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Fri, 7 Jan 2011 14:32:26 +0000 Subject: [PATCH] Sync OpenBSD patchset 827: Handle a # at the end of a replacement string (such as status-left) correctly. Found by Thomas Adam. --- status.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/status.c b/status.c index 911e8785..b694068a 100644 --- a/status.c +++ b/status.c @@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.153 2011-01-03 23:52:38 tcunha Exp $ */ +/* $Id: status.c,v 1.154 2011-01-07 14:32:26 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -469,7 +469,7 @@ status_replace(struct client *c, break; ch = *iptr++; - if (ch != '#') { + if (ch != '#' || *iptr == '\0') { *optr++ = ch; continue; }