aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cbs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cbs.h b/cbs.h
index b8b7ece..72ccef5 100644
--- a/cbs.h
+++ b/cbs.h
@@ -652,7 +652,7 @@ env_or_defaultv(struct strv *sv, const char *s, char **p, size_t n)
p = we.we_wordv;
n = we.we_wordc;
- } else if (!p)
+ } else if (!n || !*p)
return;
sv->buf = bufalloc(sv->buf, sv->len + n, sizeof(*sv->buf));