From 01f9896fb17ea1cb7228dcd13b655f3812a72919 Mon Sep 17 00:00:00 2001
From: pgen
Date: Fri, 10 Jul 2020 15:51:43 +0200
Subject: Fix a bug when reading the configuration file
The section value is not correctly updated when reading the INI file.
---
smenu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/smenu.c b/smenu.c
index dd12120..7a057ff 100644
--- a/smenu.c
+++ b/smenu.c
@@ -667,12 +667,12 @@ ini_load(const char * filename, win_t * win, term_t * term, limits_t * limits,
while (!feof(f))
{
- if (fscanf(f, "[%127[^];\n]]", section) == 1)
+ if (fscanf(f, " [%127[^];\n]]", section) == 1)
{
/* Do nothing */
/* """""""""" */
}
- else if ((cnt = fscanf(f, " %63[^=;\n] = %255[^;\n]", name, value)))
+ if ((cnt = fscanf(f, " %63[^=;\n] = %255[^;\n]", name, value)))
{
if (cnt == 1)
*value = 0;
--
cgit v1.2.3