summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/settings.c b/src/settings.c
index 6b150d1..ea17985 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -153,10 +153,11 @@ void BarSettingsRead (BarSettings_t *settings) {
/* read config file */
while (1) {
- int scanRet = fscanf (configfd, "%255s = %255[^\n]", key, val);
+ char lwhite, rwhite;
+ int scanRet = fscanf (configfd, "%255s%c=%c%255[^\n]", key, &lwhite, &rwhite, val);
if (scanRet == EOF) {
break;
- } else if (scanRet != 2) {
+ } else if (scanRet != 4 || lwhite != ' ' || rwhite != ' ') {
/* invalid config line */
continue;
}