summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2020-07-10 15:51:43 +0200
committerpgen <p.gen.progs@gmail.com>2020-07-18 18:31:03 +0200
commit01f9896fb17ea1cb7228dcd13b655f3812a72919 (patch)
tree142a91d42842fc3a0bdca18fe63fb2acf14461b7
parent883e1a2bc2f98c80c9ed64c0abaad372178c710a (diff)
Fix a bug when reading the configuration file
The section value is not correctly updated when reading the INI file.
-rw-r--r--smenu.c4
1 files 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;