diff options
author | 2014-11-08 12:50:38 +0000 | |
---|---|---|
committer | 2014-11-08 12:50:38 +0000 | |
commit | 791f470deab5473ee41a9e2f3646ffb8e395b6a9 (patch) | |
tree | fdc5ce7a74b0a1c3493cc259cca43fd8fcd8d123 | |
parent | No need to keep the temporary mappings for the MMU pages for the resume (diff) | |
download | wireguard-openbsd-791f470deab5473ee41a9e2f3646ffb8e395b6a9.tar.xz wireguard-openbsd-791f470deab5473ee41a9e2f3646ffb8e395b6a9.zip |
Empty strings should be false too for #{?}, from Marc Finet.
-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 64de3206cc5..772981ae41a 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.51 2014/10/25 08:47:04 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.52 2014/11/08 12:50:38 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net> @@ -236,7 +236,8 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen, *ptr = '\0'; value = format_find(ft, copy + 1); - if (value != NULL && (value[0] != '0' || value[1] != '\0')) { + if (value != NULL && *value != '\0' && + (value[0] != '0' || value[1] != '\0')) { value = ptr + 1; ptr = strchr(value, ','); if (ptr == NULL) |