From e7c2cca15eb6b83e7f51d6d9a5d39497aa87450a Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 29 Dec 2023 16:41:11 +0100 Subject: [PATCH] try 1 --- src/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.cpp b/src/config.cpp index 4272ecd..e887838 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -39,7 +39,7 @@ CConfig::CConfig(const char* path) { impl->envVariables.clear(); for (char** env = environ; *env; ++env) { - const std::string ENVVAR = *env; + const std::string ENVVAR = *env ? *env : ""; const auto VARIABLE = ENVVAR.substr(0, ENVVAR.find_first_of('=')); const auto VALUE = ENVVAR.substr(ENVVAR.find_first_of('=') + 1); impl->envVariables.push_back({VARIABLE, VALUE});