mirror of
https://github.com/tmux/tmux.git
synced 2024-11-17 18:08:51 +00:00
Empty strings should be false too for #{?}, from Marc Finet.
This commit is contained in:
parent
3c12b477d3
commit
c6129f9c09
3
format.c
3
format.c
@ -236,7 +236,8 @@ format_replace(struct format_tree *ft, const char *key, size_t keylen,
|
|||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
|
|
||||||
value = format_find(ft, copy + 1);
|
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;
|
value = ptr + 1;
|
||||||
ptr = strchr(value, ',');
|
ptr = strchr(value, ',');
|
||||||
if (ptr == NULL)
|
if (ptr == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user