diff options
author | nicm <nicm> | 2019-06-13 21:24:09 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-06-14 16:06:12 +0100 |
commit | 52b82742850173fa9913538a010faa98c9f9c6e1 (patch) | |
tree | 405f0fc2772353cf74d2b274b73d8d12c4eefcc2 | |
parent | a924694820c631d7d9b1b13ad48ce4fc0a60df8b (diff) |
Do not crash if the environment variable is present but empty.
-rw-r--r-- | format.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1112,7 +1112,7 @@ format_find(struct format_tree *ft, const char *key, int modifiers) envent = environ_find(ft->s->environ, key); if (envent == NULL) envent = environ_find(global_environ, key); - if (envent != NULL) { + if (envent != NULL && envent->value != NULL) { found = xstrdup(envent->value); goto found; } |