diff options
author | Phil Jones <philj56@gmail.com> | 2022-06-24 16:23:09 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-06-24 16:23:09 +0100 |
commit | 131c676fb6fc6323089acd45741a4659ffe888fc (patch) | |
tree | cfbd97a3d3702926bbb49450f86e8f8201316790 | |
parent | 42afe2dfc3c9c2f724abf2e92b6693cf6144efe6 (diff) |
Allow double-quoted strings in config file.
-rw-r--r-- | src/config.c | 4 |
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); |