summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-24 16:23:09 +0100
committerPhil Jones <philj56@gmail.com>2022-06-24 16:23:09 +0100
commit131c676fb6fc6323089acd45741a4659ffe888fc (patch)
treecfbd97a3d3702926bbb49450f86e8f8201316790 /src/config.c
parent42afe2dfc3c9c2f724abf2e92b6693cf6144efe6 (diff)
Allow double-quoted strings in config file.
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 79d0fae..2239b31 100644
--- a/src/config.c
+++ b/src/config.c
@@ -217,6 +217,10 @@ char *strip(const char *str)
if (end < start) {
return NULL;
}
+ if (str[start] == '"' && str[end] == '"' && end > start) {
+ start++;
+ end--;
+ }
size_t len = end - start + 1;
char *buf = xcalloc(len + 1, 1);
strncpy(buf, str + start, len);