From 30bb758f4f095812c593294ca7f2ab39b5fb8b39 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 29 Jan 2024 13:50:38 +0100 Subject: Fix broken check in env_or_defaultv() --- cbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v1.2.3