From bf4ac66f7d85f971583ab4ce46187bb6f7aa0642 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 11 Jul 2021 11:56:50 +0000 Subject: [PATCH] stringpool: Allow adding empty strings This is what we do when we initialize the stringpool Signed-off-by: Michael Tremer --- src/stringpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stringpool.c b/src/stringpool.c index ac0c1eb..cb13179 100644 --- a/src/stringpool.c +++ b/src/stringpool.c @@ -81,7 +81,7 @@ static int loc_stringpool_grow(struct loc_stringpool* pool, size_t length) { } static off_t loc_stringpool_append(struct loc_stringpool* pool, const char* string) { - if (!string || !*string) + if (!string) return -EINVAL; DEBUG(pool->ctx, "Appending '%s' to string pool at %p\n", string, pool); -- 2.39.2