From cc5eda56ceaeeda7a9ae521c5394286755bbc1a2 Mon Sep 17 00:00:00 2001 From: AleksArt Date: Sun, 3 Dec 2023 19:41:19 +0100 Subject: [PATCH] stuff --- src/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 5729cf5..7863c0c 100755 --- a/src/config.c +++ b/src/config.c @@ -72,14 +72,14 @@ int readConfig(const char* configFilePath) line[strlen(line) - 1] = 0; char* key = strtok(line, "="); - char* value = strtok(NULL, "="); + char* value = strchr(line, '\0') + 1; if (key == NULL || value == NULL) { msg(ERROR, "Invalid config file"); fclose(file); return 1; } - dbg(3, "Key: %s Value: %s", key, value); + dbg(2, "Key: %s Value: %s", key, value); // Set environment variables based on the key-value pairs in the config file setenv(key, value, 1);