summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-03-29 02:35:34 +0000
committermidipix <writeonce@midipix.org>2024-03-29 02:35:34 +0000
commit00c58e371d3e1b4cfd260d4af083c8ece20a537f (patch)
treefa6e8c0fa3b793896173cb6f283e318db77a510a /src
parent900ee667b99a4859f90e7d1823eb15d342e30298 (diff)
downloadslibtool-00c58e371d3e1b4cfd260d4af083c8ece20a537f.tar.bz2
slibtool-00c58e371d3e1b4cfd260d4af083c8ece20a537f.tar.xz
slbt_get_lconf_var(): return a null-terminated, zero-length string if no match.
Diffstat (limited to 'src')
-rw-r--r--src/internal/slibtool_lconf_impl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal/slibtool_lconf_impl.c b/src/internal/slibtool_lconf_impl.c
index 33dfb23..b332f9b 100644
--- a/src/internal/slibtool_lconf_impl.c
+++ b/src/internal/slibtool_lconf_impl.c
@@ -662,8 +662,10 @@ static int slbt_get_lconf_var(
}
/* not found? */
- if (!match)
+ if (!match) {
+ (*val)[0] = '\0';
return 0;
+ }
/* support a single pair of double quotes */
match = &match[len];