This commit is contained in:
Vaxry 2023-12-29 16:41:11 +01:00
parent be34da33ed
commit e7c2cca15e

View file

@ -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});