diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-21 16:13:25 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-21 16:13:25 +0000 |
commit | 49f3c5d45c5e0601ddb83ca69cbe5a6cc5dbad8d (patch) | |
tree | 2d5d6b72062b113af0470bdb1ea437d4486663c7 /usr.bin/tmux/format.c | |
parent | 0d7a3c9c6bb6b2f76a5eb07cd0a5b2c10fc6039f (diff) |
Allow formats in status options.
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r-- | usr.bin/tmux/format.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 42ed32f32f1..7568199ca41 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.12 2013/02/05 11:01:45 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.13 2013/03/21 16:13:24 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -251,10 +251,11 @@ format_expand(struct format_tree *ft, const char *fmt) continue; } } - while (len - off < 2) { + while (len - off < 3) { buf = xrealloc(buf, 2, len); len *= 2; } + buf[off++] = '#'; buf[off++] = ch; continue; } |